|
- <UserControl
- x:Class="BPASmartClient.CustomResource.UserControls.ConveyorBelt"
- 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:local="clr-namespace:BPASmartClient.CustomResource.UserControls"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- d:DesignHeight="300"
- d:DesignWidth="800"
- mc:Ignorable="d">
-
- <UserControl.Resources>
- <Storyboard x:Key="Left" RepeatBehavior="Forever">
- <DoubleAnimation
- Storyboard.TargetName="mp"
- Storyboard.TargetProperty="StrokeDashOffset"
- From="0"
- To="100"
- Duration="0:0:20" />
- </Storyboard>
-
- <Storyboard x:Key="Right" RepeatBehavior="Forever">
- <DoubleAnimation
- Storyboard.TargetName="mp"
- Storyboard.TargetProperty="StrokeDashOffset"
- From="0"
- To="-100"
- Duration="0:0:20" />
- </Storyboard>
-
- </UserControl.Resources>
-
- <Grid Name="cav">
- <Viewbox Width="auto" Height="auto">
- <Canvas Width="{Binding ElementName=cav, Path=ActualWidth}" Height="{Binding ElementName=cav, Path=ActualHeight}">
- <Path
- Name="mp"
- Margin="0"
- Stroke="{Binding StrokeFillBrush, RelativeSource={RelativeSource AncestorType=UserControl, Mode=FindAncestor}}"
- StrokeDashArray="{Binding StrokeDashArray, RelativeSource={RelativeSource AncestorType=UserControl, Mode=FindAncestor}}"
- StrokeThickness="{Binding ConveyorBeltWidth, RelativeSource={RelativeSource AncestorType=UserControl, Mode=FindAncestor}}" />
-
- <Path
- Name="cb"
- Fill="Transparent"
- Stroke="{Binding StrokeBrush, RelativeSource={RelativeSource AncestorType=UserControl, Mode=FindAncestor}}"
- StrokeThickness="{Binding StrokeThickness, RelativeSource={RelativeSource AncestorType=UserControl, Mode=FindAncestor}}" />
-
- </Canvas>
- </Viewbox>
- <VisualStateManager.VisualStateGroups>
- <VisualStateGroup>
-
- <VisualState Name="Left">
- <Storyboard x:Name="sb" RepeatBehavior="Forever">
- <DoubleAnimation
- Storyboard.TargetName="mp"
- Storyboard.TargetProperty="StrokeDashOffset"
- From="0"
- To="100"
- Duration="0:0:20" />
- </Storyboard>
- </VisualState>
-
- <VisualState Name="Right">
- <Storyboard RepeatBehavior="Forever">
- <DoubleAnimation
- Storyboard.TargetName="mp"
- Storyboard.TargetProperty="StrokeDashOffset"
- From="0"
- To="-100"
- Duration="0:0:20" />
- </Storyboard>
- </VisualState>
-
- <VisualState Name="Stop" />
-
- </VisualStateGroup>
- </VisualStateManager.VisualStateGroups>
- </Grid>
- </UserControl>
|