Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

set mouse over colors for button wpf

<Button Content="Button" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="50" Height="50" HorizontalContentAlignment="Left" BorderBrush="{x:Null}" Foreground="{x:Null}" Margin="50,0,0,0">
    <Button.Style>
        <Style TargetType="{x:Type Button}">
            <Setter Property="Background" Value="Green"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <Border Background="{TemplateBinding Background}">
                            <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Style.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="Background" Value="DarkGoldenrod"/>
                </Trigger>
            </Style.Triggers>
        </Style>
    </Button.Style>
</Button>
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# generate random int in range 
Csharp :: how to create a new folder with c# 
Csharp :: executable path with app name c# 
Csharp :: c# int to byte array 
Csharp :: string to list c# 
Csharp :: How To Copy a text C# unity 
Csharp :: how to update a project to cross target .net core 
Csharp :: Join Or Create Room() photon 
Csharp :: asp.net core redirecttoaction with parameters 
Csharp :: how to get all panels in form in c# 
Csharp :: c# determine configration at runtime 
Csharp :: check c# date for 0001/01/01 
Csharp :: how to cast list to observablecollection c# 
Csharp :: how to do if comands in c# 
Csharp :: convert request.form to dictionary c# 
Csharp :: Attach Mixer to Audio Source via script 
Csharp :: camera follow player 
Csharp :: revitapi 
Csharp :: unity pause scene 
Csharp :: c# get path without filename 
Csharp :: vb.net open file with default program 
Csharp :: blazor alert 
Csharp :: c# separate string by comma 
Csharp :: best practice c# check if string is null or whitespace 
Csharp :: c sharp if string equals 
Csharp :: how to make an object jump in unity 
Csharp :: get directory name of path c# 
Csharp :: access a local varible in a different function C# 
Csharp :: how to cjeck if a string has a word c# 
Csharp :: c# pick a random item from array 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =