I have a control that inherits from Panel. This control creates button controls based on a collection bound to the custom control. How to I handle the button.click event from the children? Here is my XAML. The command does not get executed.
<ScrollViewer HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="Auto" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
<control:TreeContainer HorizontalAlignment="Center"
Width="Auto" Height="Auto" Margin="8,8,8,8" VerticalBuffer="20"
RootNode="{Binding Path=RootNode}"
ChildrenNodes="{Binding Path=ChildrenNodes}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Button.Click">
<cmd:EventToCommand Command="{Binding Path=TreeContainerClickCommand, Mode=OneWay}" PassEventArgsToCommand="True" />
</i:EventTrigger>
</i:Interaction.Triggers>
</control:TreeContainer>
</ScrollViewer>