I have label that shoul be visible when RadioButton First
or Second
IsChecked=true
and Collapsed when Third
or Fourth
IsChecked=false
.
Is it only one way to do it pass name of the button to the converter and in converter decide should it be collapsed or visible?
<Grid>
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<StackPanel Orientation="Vertical">
<RadioButton Content="Visible" x:Name="First"></RadioButton>
<RadioButton Content="Visible" x:Name="Second"></RadioButton>
<RadioButton Content="Collapsed" x:Name="Third"/>
<RadioButton Content="Collapsed" x:Name="Fourth"></RadioButton>
</StackPanel>
<Label Content="Test" Grid.Row="1"></Label>
</Grid>