グリッド付きのsilverlight3.0アプリケーションがあります。 XAMLは次のとおりです。 ユーザーが左の列の幅を変更すると、TreeViewコントロールのサイズを変更して内容をラップしたいと思っています。現在、ツリービューはラップする代わりにスクロールバーを表示します。 右側の列にはツリービューはありませんがスタックパネルは正常です。グリッドスプリッターを使ったツリービューの自動サイズ変更幅
静的なtreeviewitemsの代わりにHierarchicalDataTemplateを使用すると同じことが起こります。
この作品を作成する方法についてのご意見はありますか?
おかげで、くそ -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>