In the latest dev build it is not possible to hide the horizontal scrollbar. This was working in the version I was using previously, 2011.1.411.1040. This seems to be caused by a change to GridViewVirtualizingPanel.MeasureOverride. I have worked around the problem by creating a derived class that saves off the HorizontalScrollBarVisibility, calls the base class MeasureOverride, and restores the original visibility.
Xaml that demonstrates the problem:
I've also attached an image that shows the scrollbar is visible in spite of being hidden in the xaml (screenshot taken w/o the workaround).
public class MyTreeListViewVirtualizingPanel : TreeListViewVirtualizingPanel
{
protected override Size MeasureOverride(Size constraint)
{
var visibility = this.ScrollOwner.HorizontalScrollBarVisibility;
var size = base.MeasureOverride(constraint);
this.ScrollOwner.HorizontalScrollBarVisibility = visibility;
return size;
}
}
Xaml that demonstrates the problem:
<
telerik:RadTreeListView
x:Name
=
"_tree"
ItemsSource
=
"{Binding TheData}"
AutoGenerateColumns
=
"False"
ScrollViewer.HorizontalScrollBarVisibility
=
"Hidden"
ScrollViewer.VerticalScrollBarVisibility
=
"Hidden"
>
<
telerik:RadTreeListView.ChildTableDefinitions
>
<
telerik:TreeListViewTableDefinition
ItemsSource
=
"{Binding Children}"
/>
</
telerik:RadTreeListView.ChildTableDefinitions
>
<
telerik:RadTreeListView.Columns
>
<
telerik:GridViewDataColumn
Header
=
"Column 1"
Width
=
"400"
DataMemberBinding
=
"{Binding Col1}"
/>
<
telerik:GridViewDataColumn
Header
=
"Column 2"
Width
=
"400"
DataMemberBinding
=
"{Binding Col2}"
/>
</
telerik:RadTreeListView.Columns
>
</
telerik:RadTreeListView
>
I've also attached an image that shows the scrollbar is visible in spite of being hidden in the xaml (screenshot taken w/o the workaround).