Its clear that by default a RadioButton
's GroupName
is scoped to the parent container. In this case, two RadioButton
s each placed at different tab of TabControl
will not be grouped together. Check the following example as an instance
<Grid>
<TabControl>
<TabItem Header="TabItem">
<Grid>
<RadioButton GroupName="A" Content="RB 1"/>
</Grid>
</TabItem>
<TabItem Header="TabItem">
<Grid>
<RadioButton GroupName="A" Content="RB 2"/>
</Grid>
</TabItem>
</TabControl>
</Grid>
I was wondering how would it be possible to extend the GroupName
scope so that when RB 1
is checked, RB 2
will be un-checked and visa-versa.
I came across interesting solutions such as this question which works by Binding
the IsChecked
property of RadioButton
s to a converter. Although it works perfectly, but I would prefer extending the GroupName
scope somehow.