How to use ToggleButton with MVVM in WPF

WPF

We need to use a command where we send the checked state of the control, here is an example:


 <ToggleButton 
 	Content="Click Me"
    Command="{Binding ToggleClientDocShowCommand}"
    CommandParameter="{Binding IsChecked,RelativeSource={RelativeSource Self}}"
     >
 </ToggleButton>

Post a Comment

Previous Post Next Post