Hi,
I have a silverlight3.0 aplication with a Grid. The XAML is below. I'd like to have the TreeView control resize and content wrapped when the user changes the width of the left column. Currently the treeview displays a scrollbar instead of wrapping. On the right column this works fine as there isno treeview but stackpanel.
The same happens when I use a HierarchicalDataTemplate instead of static treeviewitems.
Any ideas on how to make this work?
Thanks, -cc
<Grid x:Name="LayoutRoot" Background="Aqua">
<Grid.RowDefinitions>
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<StackPanel Orientation="Vertical" Grid.Column="0" Background="Yellow">
<controls:TreeView >
<controls:TreeViewItem Header="test1 some text some text some text some text some text">
<controls:TreeViewItem Header="test1.1 some text some text some text some text some text">
</controls:TreeViewItem>
</controls:TreeViewItem>
<controls:TreeViewItem Header="test2 some text some text some text some text some text some text some text some text some text some text some text">
<controls:TreeViewItem Header="test2 some text some text some text some text some text some text some text some text some text some text some text">
</controls:TreeViewItem>
</controls:TreeViewItem>
</controls:TreeView>
</StackPanel>
<controls:GridSplitter Grid.Row="0" Grid.Column="1" Width="5" VerticalAlignment="Stretch"
HorizontalAlignment="Center" Background="AliceBlue"/>
<StackPanel Grid.Column="2" Orientation="Vertical">
<TextBlock TextWrapping="Wrap"> dwd kwdh wkd wkd wkd wkjd hwkdjhw kdw dkw k</TextBlock>
<TextBlock TextWrapping="Wrap"> dwd kwdh wkd wkd wkd wkjd hwkdjdwd kwdh wkd wkd wkd wkjd hwkdjhw kdw dkw k</TextBlock>
</StackPanel>
</Grid>