I have a listView where each item consists of a dataTemplate containing a Button. This is due to a requirement where clicking on the list item will act like a button click to move you into the next step of a "Wizard".
Each Button in the DataTemplate contains a ControlTemplate.
The items inside of this controlTemplate are becoming disabled when the command's CanExecute is false. Specifically in my example below, the Button inside of the Button's template (the one with an image as it's template) is becoming disabled as well.
How can I keep the items inside of the template enabled even when the command associated with that button is disabled.
Summary: Button has template that contains another button. Button inside of template is disabled when parent button's command is disabled.
XAML:
<ListView.ItemTemplate>
<DataTemplate>
<Button Name="nextButton" Height="30" Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Wiz:edited}}, Path=DataContext.ACommand}" CommandParameter="{Binding}">
<Button.Template>
<ControlTemplate>
<StackPanel Orientation="Horizontal">
<Label Content="{Binding}"/>
<Button>
<Button.Template>
<ControlTemplate>
<Image Source="{Binding source}"/>
</ControlTemplate>
</Button.Template>
</Button>
</StackPanel>
</ControlTemplate>
</Button.Template>
</Button>
</DataTemplate>
</ListView.ItemTemplate>