PipeLineThree.xaml 4.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <UserControl x:Class="MECF.Framework.UI.Client.IndustrialControl.PipeLineThree"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:MECF.Framework.UI.Client.IndustrialControl" xmlns:converters="clr-namespace:MECF.Framework.UI.Client.IndustrialControl.Converters"
  7. mc:Ignorable="d"
  8. d:DesignHeight="200" d:DesignWidth="300">
  9. <UserControl.Resources>
  10. <converters:VisibilityConverter x:Key="visibilityConverter"></converters:VisibilityConverter>
  11. </UserControl.Resources>
  12. <Canvas x:Name="canvas1">
  13. <Polygon x:Name="polygon1" Points="130,40 150,20 170,40 170,200 130,200 130, 40">
  14. <Polygon.Fill>
  15. <LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
  16. <GradientStop Color="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type local:PipeLineThree}},Path=EdgeColor}" Offset="0"></GradientStop>
  17. <GradientStop Color="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type local:PipeLineThree}},Path=CenterColor}" Offset="0.5"></GradientStop>
  18. <GradientStop Color="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type local:PipeLineThree}},Path=EdgeColor}" Offset="1"></GradientStop>
  19. </LinearGradientBrush>
  20. </Polygon.Fill>
  21. </Polygon>
  22. <Path x:Name="path1"
  23. Visibility="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type local:PipeLineThree}},Path=PipeLineActive1,Converter={StaticResource visibilityConverter}}"
  24. StrokeThickness="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type local:PipeLineThree}},Path=PipeLineWidth}"
  25. StrokeDashOffset="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type local:PipeLineThree}},Path=LineOffect1}" StrokeDashArray="5,5">
  26. <Path.Stroke>
  27. <SolidColorBrush Color="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type local:PipeLineThree}},Path=ActiveLineCenterColor}"></SolidColorBrush>
  28. </Path.Stroke>
  29. </Path>
  30. <Path x:Name="path2"
  31. Visibility="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type local:PipeLineThree}},Path=PipeLineActive2,Converter={StaticResource visibilityConverter}}"
  32. StrokeThickness="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type local:PipeLineThree}},Path=PipeLineWidth}"
  33. StrokeDashOffset="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type local:PipeLineThree}},Path=LineOffect2}" StrokeDashArray="5,5">
  34. <Path.Stroke>
  35. <SolidColorBrush Color="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type local:PipeLineThree}},Path=ActiveLineCenterColor}"></SolidColorBrush>
  36. </Path.Stroke>
  37. </Path>
  38. <Path x:Name="path3"
  39. Visibility="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type local:PipeLineThree}},Path=PipeLineActive3,Converter={StaticResource visibilityConverter}}"
  40. StrokeThickness="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type local:PipeLineThree}},Path=PipeLineWidth}"
  41. StrokeDashOffset="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type local:PipeLineThree}},Path=LineOffect3}" StrokeDashArray="5,5">
  42. <Path.Stroke>
  43. <SolidColorBrush Color="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type local:PipeLineThree}},Path=ActiveLineCenterColor}"></SolidColorBrush>
  44. </Path.Stroke>
  45. </Path>
  46. </Canvas>
  47. </UserControl>