I\'ve got some RadioButtons in my XAML...
Better Solution using WPF MVVM Design Pattern:
Radio Button Control XAML to Modelview.vb/ModelView.cs :
XAML Code:
ViewModel.vb :
Private _OffJob As Boolean = False
Private _OnJob As Boolean = False
Public Property OnJob As Boolean
Get
Return _OnJob
End Get
Set(value As Boolean)
Me._OnJob = value
End Set
End Property
Public Property OffJob As Boolean
Get
Return _OffJob
End Get
Set(value As Boolean)
Me._OffJob = value
End Set
End Property
Private Sub FindCheckedItem()
If(Me.OnJob = True)
MessageBox.show("You have checked On")
End If
If(Me.OffJob = False)
MessageBox.Show("You have checked Off")
End sub
One can use the same logic above to see if you checked any of the three Radio Buttons viz. Option One, Option Two, Option Three. But checking if the Boolean set id true or false you can identify whether the radio button is checked or not.