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