.net WPF ComboBox不支持Windows 10上的背景设置程序
我有一个简单的组合框,源代码附在下面:.net WPF ComboBox不支持Windows 10上的背景设置程序,.net,wpf,windows,xaml,combobox,.net,Wpf,Windows,Xaml,Combobox,我有一个简单的组合框,源代码附在下面: <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/ble
<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>
在Windows 7/Server 2008上,组合框以红色背景显示。在Windows 10上运行完全相同的代码或二进制文件时,组合框将丢失红色背景并变为灰色
如何使Win10背景变为红色,并以不会破坏Win7代码的方式执行此操作?可能的重复