I have two RadioButtons on a wpf window that the user can use to indicate whether a transaction is of type credit or debit. The DataContext of the window is a transaction with an integer property TypeID. I am trying to bind the RadioButtons to this property using a converter in XAML. Here's the relevant portion of my XAML:
<StackPanel
Orientation="Horizontal">
<RadioButton Content="Credit"
IsChecked="{Binding Path=TypeID, Converter={StaticResource conBooleanToInt}}" />
<RadioButton
Content="Debit"
IsChecked="{Binding Path=TypeID, Converter={StaticResource conBooleanToInt}}"
Margin="15,0,0,0">
</RadioButton>
</StackPanel>
and here is the BooleanToInt converter:
Public Class BooleanToInt
Implements IValueConverter
Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.Convert
Dim x As Boolean = CBool(value)
Console.WriteLine($"Convert {x}")
Return If(x, 5, 209)
End Function
Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.ConvertBack
Dim x As Boolean = CBool(value)
Console.WriteLine($"Back {x}")
Return If(x, 5, 209)
End Function
End Class
When the window is loaded here is what it looks like:

and here is the output of the Console statements:
Convert False
Convert False
Back False
Convert True
Convert True
Obviously, this is not working:
Why is the converter called five times, yielding different results
Why do both RadioButtons have IsClicked = True (which should not be possible)
and the ultimate question:
How to do this?