I'm working on a RichTextBox editor which has allows the user to select a 'document' from a hierarchical tree (displayed using the RadTreeView) which then displays the document in a RadRichTextBox for editing. The basic XAML I have so far is as below:
At this time the documents are simpler displayed in the tree as a list (of buttons). Eventually it should be a hierarchical tree.
My problem at this time is that when the GridSplitter is moved by the user the RadTreeView does not currently change size. I would like it to fill the space as dictated by the position of the GridSplitter, and then add scroll bars when the TreeView is larger than the horizontal and vertical space provided for it.
What do I need to do to achieve this?
<Grid x:Name="documentContent" Grid.Row="1">
<!-- Layout -->
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- Column 1 -->
<telerik:RadTreeView x:Name="documentTree" ItemsSource="{Binding Path=DocumentRefs}" BorderThickness="5" BorderBrush="BlueViolet">
<telerik:RadTreeView.ItemTemplate>
<!-- Temp binding until full hierarchy sorted -->
<sdk:HierarchicalDataTemplate>
<Button Content="{Binding}" Command="{Binding Path=SelectDocument, Source={StaticResource ViewModel}}" CommandParameter="{Binding}" />
</sdk:HierarchicalDataTemplate>
</telerik:RadTreeView.ItemTemplate>
</telerik:RadTreeView>
<!-- Column 2-->
<sdk:GridSplitter Grid.Column="1"/>
<!-- Column 3 -->
<telerik:RadRichTextBox Name="editor" Grid.Column="2" />
</Grid>
At this time the documents are simpler displayed in the tree as a list (of buttons). Eventually it should be a hierarchical tree.
My problem at this time is that when the GridSplitter is moved by the user the RadTreeView does not currently change size. I would like it to fill the space as dictated by the position of the GridSplitter, and then add scroll bars when the TreeView is larger than the horizontal and vertical space provided for it.
What do I need to do to achieve this?