gofor.net
gofor.net

Reputation: 4298

How to Change Radiobutton Icon against theme set in Windows Phone 8

In my application I am using not using windows default theme color for background instead of this I have used White color is my default. Now I am changing the content colors of the controls. Now all others are working good but in RadioButton I am getting some issue to set the RadioButton Icon color as it is still showing white according to phone theme(Phone theme is Black)

Do I need to set any external style for that? Can anyone please guide how I will achieve this?

Here is my code:

<ListBox Name="lstPollsQuestion" Grid.Row="1">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <StackPanel>
                                    <RadioButton Name="rdbBlockTitle" 
                                             Margin="0,0,0,-20" 
                                             Height="72"
                                             GroupName="PollQuestion" 
                                             Click="RadioButton_Click"
                                             FontFamily="Segoe WP Light"
                                             Tag="{Binding Path=questionId}">
                                        <RadioButton.Content>
                                            <TextBlock Text="{Binding Path=question}" Foreground="Black"/>
                                        </RadioButton.Content>
                                    </RadioButton>
                                </StackPanel>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>

screenshot of the page

enter image description here

Upvotes: 0

Views: 527

Answers (1)

Chris W.
Chris W.

Reputation: 23280

If we take a look at the default template for the RadioButton towards the bottom there's an Ellipse named "CheckGlyph" with Fill="{ThemeResource RadioButtonForegroundThemeBrush}" declared. So you can change it on the template level or that particular resource color.

Upvotes: 1

Related Questions