だから私は ContentControl として使用している StackPanel を持っています。バインドしているデータに基づいてボタンを生成したい場所があり、それはすべてうまく機能していますが、現在起こっているようにボタンを垂直ではなく水平に配置したいと考えています。スクリーンショットは次のとおりです。
そして、ここに私の ContentTemplate の説明からのコードがあります:
<StackPanel Name="wpReleaseButtons" Orientation="Horizontal" Grid.Row="2">
<ItemsControl IsTabStop="False" ItemsSource="{Binding Path=BranchCommands}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Button Tag="{Binding}" Padding="3">
<TextBlock Text="{Binding Path=DisplayValue}" />
</Button>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
ここで何が間違っているのかわかりません。どんな情報でも大歓迎です。ありがとう!