.net - WPF ComboBox does not respect Background setter on Windows 10 -


i have simple combobox, source attached below:

<window x:class="comboboxtest.mainwindow"     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"     xmlns:d="http://schemas.microsoft.com/expression/blend/2008"     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"     mc:ignorable="d"     title="mainwindow" height="350" width="525"> <grid>     <combobox background="red" height="20" width="50" verticalalignment="top" horizontalalignment="left">         <comboboxitem content="a"></comboboxitem>         <comboboxitem content="b"></comboboxitem>         <comboboxitem content="c"></comboboxitem>     </combobox> </grid> 

on windows 7/server 2008, combobox shown red background. when running exact same code or binaries on windows 10, combobox loses red background , becomes grey.

win 7 win10 combobox example

how can win10 background become red, , in manner not break win7 code?


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -