-
-
Save anonymous/d3e91806639e61c3fdaab46370046ab1 to your computer and use it in GitHub Desktop.
This file contains 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
<Window x:Class="WPFTestApp.MainWindow" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
xmlns:local="clr-namespace:WPFTestApp" | |
mc:Ignorable="d" | |
Title="MainWindow" Height="350" Width="525"> | |
<Grid Name="root"> | |
<Border BorderThickness="2" BorderBrush="Gray" Height="20" Width="150" > | |
<Border.Resources> | |
<Style TargetType="Border"> | |
<Style.Resources> | |
<Storyboard x:Key="animation" x:Name="animation"> | |
<DoubleAnimation | |
Storyboard.TargetProperty="BorderBrush.(GradientBrush.GradientStops)[1].(GradientStop.Offset)" | |
From="-.3" To="1.1" Duration="0:0:1" | |
RepeatBehavior="Forever" | |
/> | |
</Storyboard> | |
</Style.Resources> | |
<Setter Property="Background"> | |
<Setter.Value> | |
<LinearGradientBrush> | |
<GradientStop Color="Black" Offset="-.4" /> | |
<GradientStop Color="White" Offset="-.3" /> | |
<!--<GradientStop Color="Black" Offset="-.2" /> | |
<GradientStop Color="White" Offset="-.1" /> | |
<GradientStop Color="Black" Offset="0" /> | |
<GradientStop Color="White" Offset=".1" /> | |
<GradientStop Color="Black" Offset=".2" /> | |
<GradientStop Color="White" Offset=".3" /> | |
<GradientStop Color="Black" Offset=".4" /> | |
<GradientStop Color="White" Offset=".5" /> | |
<GradientStop Color="Black" Offset=".6" /> | |
<GradientStop Color="White" Offset=".7" /> | |
<GradientStop Color="Black" Offset=".8" /> | |
<GradientStop Color="White" Offset=".9" /> | |
<GradientStop Color="Black" Offset="1.0" /> | |
<GradientStop Color="White" Offset=".9" />--> | |
<GradientStop Color="Black" Offset="1.0" /> | |
</LinearGradientBrush> | |
</Setter.Value> | |
</Setter> | |
<Setter Property="Storyboard.Target" Value="{StaticResource animation}" /> | |
</Style> | |
</Border.Resources> | |
</Border> | |
</Grid> | |
</Window> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment