I have a ListView using a GridView as it’s view and each item in the list has a DataTemplate with a RadioButton. I’m trying to figure out how to have the first (or any) RadioButton be checked and actually fire the Checked event. Here is my xaml:
<ListView.View>
<GridView>
<GridViewColumn Header="Selected">
<GridViewColumn.CellTemplate>
<DataTemplate>
<RadioButton Name="selectedFoo"
Checked="selectedRadio_Checked"
IsChecked="True"
Tag="{Binding Id}"/>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Header="Id" DisplayMemberBinding="{Binding Id}"/>
<GridViewColumn Header="Name" DisplayMemberBinding="{Binding Name}"/>
</GridView>
</ListView.View>
</ListView>
I ended up attaching a handler to the radio buttons loaded event and calling it’s Checked handler. Not the best solution but it works for me.