Add a multi-colored button, mouse over and then bang this nasty blue selection.

Maybe someone knows how to fix it?

I use Windows Forms.

  • one
    .NET As far as I know - Mikola Mirchuk
  • Emmm ... then no difference? (I can use both) - Mikola Mirchuk
  • No, he of practical importance is a program that is ugly and I am ready to use anything to ensure quality - Mikola Mirchuk

1 answer 1

If on WPF, here is a small style:

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:EvilUI"> <Color x:Key="MouseLeave" A="255" R="69" G="69" B="69" /> <Color x:Key="MouseOver" A="255" R="105" G="105" B="105" /> <SolidColorBrush x:Key="BorderBrush" Color="#EEE"/> <!--Button Style--> <Style TargetType="Button"> <Setter Property="Foreground" Value="#B7B7B7"/> <Setter Property="BorderThickness" Value="0"/> <Setter Property="FontFamily" Value="Tahoma"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="Button"> <Border x:Name="TemplateBorder" RenderTransformOrigin="0.5,0.5" BorderBrush="{StaticResource BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"> <Border.Background> <SolidColorBrush x:Name="BtnBgColor" Color="{StaticResource MouseLeave}"/> </Border.Background> <ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center"/> </Border> <ControlTemplate.Triggers> <MultiTrigger> <MultiTrigger.Conditions> <Condition Property="IsMouseOver" Value="True"/> <Condition Property="IsEnabled" Value="True"/> </MultiTrigger.Conditions> <!--<Setter Property="RenderTransform" TargetName="TemplateBorder"> <Setter.Value> <TransformGroup> <ScaleTransform ScaleX="1.05" ScaleY="1.05"></ScaleTransform> </TransformGroup> </Setter.Value> </Setter>--> <MultiTrigger.EnterActions> <BeginStoryboard> <Storyboard x:Name="EnterMouse"> <ColorAnimation Storyboard.TargetName="BtnBgColor" Storyboard.TargetProperty="Color" To="{StaticResource MouseOver}" Duration="0:0:0:0"/> </Storyboard> </BeginStoryboard> </MultiTrigger.EnterActions> <MultiTrigger.ExitActions> <BeginStoryboard> <Storyboard x:Name="LeaveMouse"> <ColorAnimation Storyboard.TargetName="BtnBgColor" Storyboard.TargetProperty="Color" To="{StaticResource MouseLeave}" Duration="0:0:0:0"/> </Storyboard> </BeginStoryboard> </MultiTrigger.ExitActions> </MultiTrigger> <!--<MultiTrigger> <MultiTrigger.Conditions> <Condition Property="IsPressed" Value="True"/> </MultiTrigger.Conditions> <Setter Property="RenderTransform" TargetName="TemplateBorder"> <Setter.Value> <TransformGroup> <ScaleTransform ScaleX="0.9" ScaleY="0.9"></ScaleTransform> </TransformGroup> </Setter.Value> </Setter> </MultiTrigger>--> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> </ResourceDictionary> 

Well, on WinForms through the FlatAppearance property

enter image description here

Something like this

FlatStyle must be made equal to Flat, that is, it will be flat as in 10 Windows.

  • Thank! And winforms in any way? - Mikola Mirchuk
  • Completed the answer at - Sasuke
  • @ Sanitary, you have laid out a screen of this, so that we will check your wallpaper? 3/4 can be cut and save people traffic at the same time. Put a minus for the design, correct - remove - Andrew NOP
  • And yet, the black circle around the oval on a dark gray background is very poorly distinguishable. Circle better red. // cc: @Andrey - ߊߚߤߘ
  • one
    And yes, we already understood that you have a cool game video card in SLI mode and four monitors. Now please trim the picture. - ߊߚߤߘ