1
我想着色WPF應用程序中的複選框。我試圖在XAML中鍵入此:着色wpf複選框C#
<CheckBox x:Name="topintegral" Content="TOP Integral" `enter code here`
RenderTransformOrigin="0.5,0.5" Width="188" Margin="94,105,68,86"
FontWeight="Bold" FontSize="15" Background="Black"
MouseEnter="MouseFocus" MouseLeave="MouseLeave" BorderBrush="#FFE6FFFF">
,並在.cs文件:
private void MouseFocus(object sender, MouseEventArgs e)
{
topintegral.Background = new SolidColorBrush(Colors.White);
}
但它表明這樣的:
你期待什麼結果? – mm8