WPF Combobox rendering on XP
I have a problem with a simple combobox rendering on XP.
The code is just:
<ComboBox Cursor="Hand" customCommands:ComboBoxSelectionChange.Command="{Binding StatusChange}" It开发者_StackOverflow中文版emsSource="{Binding AvailabilityStatusList}"/>
However, the result on different OSs is not quite i've expected:
Vista:
XP:You can force a WPF application to apply a certain Windows standard scheme, regardless of the current Windows Version (e.g. XP vs. Vista).
To force you application to use the Aero theme (Vista), put this in your App.xaml:
<!-- Use the Aero scheme for your application, regardless the currently applied Windows Theme or OS Version. -->
<ResourceDictionary
Source="/PresentationFramework.Aero, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35, ProcessorArchitecture=MSIL;component/themes/aero.normalcolor.xaml" />
The ComboBox -like most other controls- takes into account the OS theme, so that your user interface will be consistent with the rest of the OS surface.
If you want to create an "OS-agnostic" look (i.e. keep the same look across different operating systems) you have to re-template it.
精彩评论