Last active
March 27, 2023 11:31
-
-
Save s-fernandez-v/9733a88d4265d8c9e7408ec303fe9b9b to your computer and use it in GitHub Desktop.
BorderBrush action
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Grid | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"> | |
<Border x:Name="TheBorder" Width="200" Height="100" BorderBrush="Red" Background="Pink"> | |
<b:Interaction.Triggers> | |
<b:EventTrigger EventName="Loaded"> | |
<b:ChangePropertyAction TargetName="TheBorder" PropertyName="BorderThickness" Value="1"/> | |
</b:EventTrigger> | |
<b:EventTrigger EventName="MouseDown"> | |
<b:ChangePropertyAction TargetName="TheBorder" PropertyName="BorderThickness" Value="20"/> | |
<b:ChangePropertyAction TargetName="TheBorder" PropertyName="BorderBrush" Value="Green"/> | |
</b:EventTrigger> | |
<b:EventTrigger EventName="MouseUp"> | |
<b:ChangePropertyAction TargetName="TheBorder" PropertyName="BorderThickness" Value="10"/> | |
<b:ChangePropertyAction TargetName="TheBorder" PropertyName="BorderBrush" Value="Blue"/> | |
</b:EventTrigger> | |
</b:Interaction.Triggers> | |
</Border> | |
</Grid> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment