I have a WPF window with several ToggleButtons, I want it to be only enabled if the property of that same table prop1 (another togglebutton) is active and enabled, in addition to if the property toggle2 is active. With the first two binding, because with putting the path it already takes the IsChecked
by default, but I do not know how to access the multibinding property IsEnabled
since it always returns UnsetValue for the converter even though this unset is not.
<ToggleButton Checked="myprop_Checked" Unchecked="myprop__Unchecked" x:Name="myprop" Margin="-20,0,0,0" IsChecked="{Binding myprop, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" >
<ToggleButton.IsEnabled>
<MultiBinding Converter="{StaticResource isEnabledConv}">
<Binding Path="prop1"/>
<Binding Path="toggle2"/>
<Binding Path="prop1" ElementName="IsEnabled"/>
</MultiBinding>
</ToggleButton.IsEnabled>
Clarify that it is inside a DataGridTemplateColumn that is part of a DataGrid linked to a list of the DataContext that is a list of objects of my user class with simple types.