-
-
Save anonymous/e0b79ecaab26dc3d0eca54d1dbee3a22 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"> | |
<Window.Resources> | |
<Color x:Key="backgroundcolor" R="00" G="00" B="00" /> | |
<Color x:Key="foregroundcolor" R="0xFF" G="0xFF" B="0xFF" /> | |
<LinearGradientBrush x:Key="gradientBrush"> | |
<GradientStop x:Name="Stop1" Color="{StaticResource backgroundcolor}" Offset="-.4" /> | |
<GradientStop x:Name="Stop2" Color="{StaticResource foregroundcolor}" Offset="-.3" /> | |
<GradientStop x:Name="Stop3" Color="{StaticResource backgroundcolor}" Offset="-.2" /> | |
<GradientStop x:Name="Stop4" Color="{StaticResource foregroundcolor}" Offset="-.1" /> | |
<GradientStop x:Name="Stop5" Color="{StaticResource backgroundcolor}" Offset="0" /> | |
<GradientStop x:Name="Stop6" Color="{StaticResource foregroundcolor}" Offset=".1" /> | |
<GradientStop x:Name="Stop7" Color="{StaticResource backgroundcolor}" Offset=".2" /> | |
<GradientStop x:Name="Stop8" Color="{StaticResource foregroundcolor}" Offset=".3" /> | |
<GradientStop x:Name="Stop9" Color="{StaticResource backgroundcolor}" Offset=".4" /> | |
<GradientStop x:Name="Stop10" Color="{StaticResource foregroundcolor}" Offset=".5" /> | |
<GradientStop x:Name="Stop11" Color="{StaticResource backgroundcolor}" Offset=".6" /> | |
<GradientStop x:Name="Stop12" Color="{StaticResource foregroundcolor}" Offset=".7" /> | |
<GradientStop x:Name="Stop13" Color="{StaticResource backgroundcolor}" Offset=".8" /> | |
<GradientStop x:Name="Stop14" Color="{StaticResource foregroundcolor}" Offset=".9" /> | |
<GradientStop x:Name="Stop15" Color="{StaticResource backgroundcolor}" Offset="1.0" /> | |
<GradientStop x:Name="Stop16" Color="{StaticResource foregroundcolor}" Offset="1.1" /> | |
<GradientStop x:Name="Stop17" Color="{StaticResource backgroundcolor}" Offset="1.2" /> | |
</LinearGradientBrush> | |
<Style x:Key="stripes" TargetType="Border"> | |
<Style.Triggers> | |
<EventTrigger RoutedEvent="Loaded"> | |
<BeginStoryboard> | |
<Storyboard> | |
<DoubleAnimation | |
Storyboard.TargetProperty="gradientBrush.(GradientBrush.GradientStops)[1].(GradientStop.Offset)" | |
By=".2" Duration="0:0:1" | |
RepeatBehavior="Forever" | |
/> | |
<DoubleAnimation | |
Storyboard.TargetProperty="gradientBrush.(GradientBrush.GradientStops)[2].(GradientStop.Offset)" | |
By=".2" Duration="0:0:1" | |
RepeatBehavior="Forever" | |
/> | |
<DoubleAnimation | |
Storyboard.TargetProperty="gradientBrush.(GradientBrush.GradientStops)[3].(GradientStop.Offset)" | |
By=".2" Duration="0:0:1" | |
RepeatBehavior="Forever" | |
/> | |
<DoubleAnimation | |
Storyboard.TargetProperty="gradientBrush.(GradientBrush.GradientStops)[4].(GradientStop.Offset)" | |
By=".2" Duration="0:0:1" | |
RepeatBehavior="Forever" | |
/> | |
<DoubleAnimation | |
Storyboard.TargetProperty="gradientBrush.(GradientBrush.GradientStops)[5].(GradientStop.Offset)" | |
By=".2" Duration="0:0:1" | |
RepeatBehavior="Forever" | |
/> | |
<DoubleAnimation | |
Storyboard.TargetProperty="gradientBrush.(GradientBrush.GradientStops)[6].(GradientStop.Offset)" | |
By=".2" Duration="0:0:1" | |
RepeatBehavior="Forever" | |
/> | |
<DoubleAnimation | |
Storyboard.TargetProperty="gradientBrush.(GradientBrush.GradientStops)[7].(GradientStop.Offset)" | |
By=".2" Duration="0:0:1" | |
RepeatBehavior="Forever" | |
/> | |
<DoubleAnimation | |
Storyboard.TargetProperty="gradientBrush.(GradientBrush.GradientStops)[8].(GradientStop.Offset)" | |
By=".2" Duration="0:0:1" | |
RepeatBehavior="Forever" | |
/> | |
<DoubleAnimation | |
Storyboard.TargetProperty="gradientBrush.(GradientBrush.GradientStops)[9].(GradientStop.Offset)" | |
By=".2" Duration="0:0:1" | |
RepeatBehavior="Forever" | |
/> | |
<DoubleAnimation | |
Storyboard.TargetProperty="gradientBrush.(GradientBrush.GradientStops)[10].(GradientStop.Offset)" | |
By=".2" Duration="0:0:1" | |
RepeatBehavior="Forever" | |
/> | |
<DoubleAnimation | |
Storyboard.TargetProperty="gradientBrush.(GradientBrush.GradientStops)[11].(GradientStop.Offset)" | |
By=".2" Duration="0:0:1" | |
RepeatBehavior="Forever" | |
/> | |
<DoubleAnimation | |
Storyboard.TargetProperty="gradientBrush.(GradientBrush.GradientStops)[12].(GradientStop.Offset)" | |
By=".2" Duration="0:0:1" | |
RepeatBehavior="Forever" | |
/> | |
<DoubleAnimation | |
Storyboard.TargetProperty="gradientBrush.(GradientBrush.GradientStops)[13].(GradientStop.Offset)" | |
By=".2" Duration="0:0:1" | |
RepeatBehavior="Forever" | |
/> | |
<DoubleAnimation | |
Storyboard.TargetProperty="gradientBrush.(GradientBrush.GradientStops)[14].(GradientStop.Offset)" | |
By=".2" Duration="0:0:1" | |
RepeatBehavior="Forever" | |
/> | |
<DoubleAnimation | |
Storyboard.TargetProperty="gradientBrush.(GradientBrush.GradientStops)[15].(GradientStop.Offset)" | |
By=".2" Duration="0:0:1" | |
RepeatBehavior="Forever" | |
/> | |
</Storyboard> | |
</BeginStoryboard> | |
</EventTrigger> | |
</Style.Triggers> | |
</Style> | |
</Window.Resources> | |
<Grid Name="root"> | |
<Border BorderThickness="2" BorderBrush="Gray" Height="20" Width="150" Style="{StaticResource stripes}" /> | |
</Grid> | |
</Window> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment