Ranjith Venkatesh
Ranjith Venkatesh

Reputation: 1362

Radio button in WPF Application selected but not visible

I have a radio button in a WPF Application which works normally in Windows 7.

However in some XP machines, the radio button selection is not visible but the clicked event is fired.

Why does this happen? Is this a repaint issue or a computer settings issue?

UPDATE This problem comes only in the computer which uses Windows Classic Theme

Upvotes: 0

Views: 2728

Answers (3)

Ranjith Venkatesh
Ranjith Venkatesh

Reputation: 1362

The solution was to add a label inside the radiobutton as below:

<RadioButton
                              IsChecked="{Binding Path=IsSelected}"
                              GroupName="InstallType"
                              Margin="2,3.5"
                              Foreground="Black"                
                              >
                            <Label Content="{Binding Path=DisplayName}"/>
                        </RadioButton>

I saw the solution here: http://www.carlos-roque.com/2011/07/25/making-wpf-checkbox-and-radiobutton-display-correctly-in-windows-classic-theme/

Upvotes: 2

user853710
user853710

Reputation: 1767

You should check the version of the .NET framework. on these XP machines

Upvotes: 0

AsitK
AsitK

Reputation: 673

You can check with the template used by radio button. Make sure the brushes/colors used in windows 7 are available in XP.

These links should provide some more help

  1. http://msdn.microsoft.com/en-us/library/ms751600.aspx
  2. http://msdn.microsoft.com/en-us/library/windows/apps/jj709925.aspx

Check for the "Checked State"

Upvotes: 1

Related Questions