Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
290
How to disable horizontal scroll bar in the XamTree control?
posted

I would like to disable horizontal scroll bar in the XamTree control to get a tree view like in MS Outlook (there is no horizontal scroll bar when you minimize the outlook bar in MS Outlook).  The problem is that when I disable it, XamTreeItems get truncated.  ScrollViewer.HorizontalScrollBarVisibility="Hidden" does not work for me because, in this case, when you select a child XamTreeItem, XamTree automatically scrolls to the selected item. 

 

<Grid x:Name="LayoutRoot" Background="White" Width="400">

   <ig:XamTree x:Name="XamNavigationTree" ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>

</Grid>

 

private void MainPage_OnLoaded(object sender, RoutedEventArgs e)

{

   for (int i = 0; i < 10; i++)

   {

      XamTreeItem parentItem = new XamTreeItem();

      parentItem.Header = "Parent XamTreeItem with a long header";

      XamNavigationTree.Items.Add(parentItem);

 

      for (int j = 0; j < 5; j++)

      {

         XamTreeItem child = new XamTreeItem();

         child.Header = "Child XamTreeItem with a long header.Child XamTreeItem with a long header";

         parentItem.Items.Add(child);

      }

    }

 }

Parents Reply Children
No Data