It sounds like you're binding the IsEnabled
property of the RadioButton
instead of the ListBoxItem
. This would disable the RadioButton
, but not the ListBoxItem
, which is why it can still be selected.
You should be able to bind the IsEnabled
property of the ListBoxItem
, and it will work the way you want.
Based on the link you posted going to the style you're using, that would be in the ItemContainerStyle
section of the RadioButtonList
style:
<Style TargetType="{x:Type ListBoxItem}" >
<!-- Here -->
<Setter Property="IsEnabled" Value="{Binding IsEnabled}" />
<Setter Property="Margin" Value="5" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<Border BorderThickness="0" Background="Transparent">
<RadioButton Focusable="False"
IsHitTestVisible="False"
IsChecked="{TemplateBinding IsSelected}">
<ContentPresenter />
</RadioButton>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>