1
WPF應用程序的外觀和感覺在Win7中是不同的& Win10版本如附圖所示。所有的控件都有紅色邊框,但在Win10中會注意到以下行爲。在Win文本框(上懸停和選擇)和組合框邊框變爲藍色10.Win7和Win10在WPF應用程序中的區別
所施加的樣式如下
<Style TargetType="{x:Type TextBox}">
<Setter Property="BorderBrush" Value="#FFcecece" />
<Setter Property="Foreground" Value="#FF777777"/>
<Setter Property="BorderThickness" Value="1.6" />
</Style>
<Style TargetType="{x:Type ComboBox}">
<Setter Property="BorderBrush" Value="#FFcecece" />
<Setter Property="Foreground" Value="#FF777777"/>
<Setter Property="BorderThickness" Value="1.6" />
</Style>
紅色邊界施加直通代碼後面如下當上述行爲是注意到了
textBox1.BorderBrush = Media.Brushes.Red;
textBox3.BorderBrush = Media.Brushes.Red;
combobox5.BorderBrush = Media.Brushes.Red;
combobox7.BorderBrush = Media.Brushes.Red;
我怎樣才能獲得相同的外觀和跨Windows的所有操作系統版本有什麼感覺?
嘗試添加航空DLL和它使嵌入到你的App.xaml。這將改變很多^^ –
將增加相同的結果並回復 – Alice