I have a ToggleButton. I'm using a command binding, and I want to pass the value of its IsChecked property as a parameter. How can I do this without naming the ToggleButton and using its name to address itself?
Currently I'm solving this by naming the control, but I assume this can be done a better way?
<ToggleButton x:Name="_myToggle"
Command="{Binding SomeCommand}"
CommandParameter="{Binding ElementName=_myToggle, Path=IsChecked}">
Apply Toggle
</ToggleButton>