私はユーザーコントロールを持っています。その主な内容は以下のとおりです
<ItemsControl Grid.Row="0" ItemsSource="{Binding myCollection}" HorizontalContentAlignment="Stretch" x:Name="lstExpander" >
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" IsItemsHost="True" FlowDirection="LeftToRight" Margin="0,0,0,0" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemContainerStyle>
<Style TargetType="ContentPresenter">
<Setter Property="Margin" Value="100,0,0,0"></Setter>
</Style>
</ItemsControl.ItemContainerStyle>
<ItemsControl.ItemTemplate>
<DataTemplate>
<local:AttributeExpander>/local:AttributeExpander>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
このコントロールの項目は、ボタンを含む ConditionalAttributeExpander などのユーザー コントロールです。そのボタンが項目コントロールの項目をクリックすると、コマンドが親コントロールで処理されるようにします。