2列のWrapPanelがあり、子として次のようなものを使用します:
<Grid x:Name="LayoutRoot">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition />
</Grid.RowDefinitions>
<Button HorizontalAlignment="Left"
Grid.Row="0" x:Name="Button" FontSize="20" Click="ShowTextblock">
<TextBlock TextWrapping="Wrap" TextDecorations="underline"
TextAlignment="Left">
ButtonName
</TextBlock>
</Button>
<TextBlock Grid.Row=1 Visibility="Collapsed">SampleText</TextBlock>
</Grid>
したがって、ユーザーがボタンをクリックすると、このボタンの下にテキストブロックが表示されます。このような:
ボタン ボタン
テキスト ボタン
ボタン
ボタン ボタン
ボタン ボタン
しかし、結果として私はこれを持っています:
ボタンボタンボタン
の
ボタン
ボタン
テキスト
では、どうすればやりたいことができるのでしょうか。