aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Visuals/Led/Led.xaml
blob: b59ed5d15dbc81f46e6a2fea73997c98cd392e27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.highlight .na { color: #336699 } /* Name.Attribute */
.highlight .nb { color: #003388 } /* Name.Builtin */
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
.highlight .nd { color: #555555 } /* Name.Decorator */
.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */
.highlight .nl { color: #336699; font-style: italic } /* Name.Label */
.highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
.highlight .py { color: #336699; font-weight: bold } /* Name.Property */
.highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
.highlight .nv { col
<UserControl x:Class="Tango.Visuals.Led"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:converters="clr-namespace:Tango.Visuals.Converters"
             mc:Ignorable="d" 
             d:DesignHeight="150" d:DesignWidth="150">
    <UserControl.Resources>
        <converters:BooleanToVisibilityConverter x:Key="v"></converters:BooleanToVisibilityConverter>

        <RadialGradientBrush x:Key="outer"
		Center="0.5,0.5" GradientOrigin="0.5,0.5" RadiusX="0.5" RadiusY="0.5" 
		SpreadMethod="Pad" ColorInterpolationMode="SRgbLinearInterpolation" >
            <GradientStop Color="Transparent" Offset="0" />
            <GradientStop Color="Transparent" Offset="1" />
        </RadialGradientBrush>

        <RadialGradientBrush x:Key="inner"
		Center="0.5,0.5" GradientOrigin="0.5,0.5" RadiusX="0.5" RadiusY="0.5" 
		SpreadMethod="Pad" ColorInterpolationMode="SRgbLinearInterpolation" >
            <GradientStop Color="#FF98FF00" Offset="0" />
            <GradientStop Color="#FF01472B" Offset="1" />
        </RadialGradientBrush>

        <RadialGradientBrush x:Key="innerOff"
		Center="0.5,0.5" GradientOrigin="0.5,0.5" RadiusX="0.5" RadiusY="0.5" 
		SpreadMethod="Pad" ColorInterpolationMode="SRgbLinearInterpolation" >
            <GradientStop Color="Red" Offset="0" />
            <GradientStop Color="#FF670000" Offset="1" />
        </RadialGradientBrush>
    </UserControl.Resources>

    <Grid>
        <Grid x:Name="grid">
            <Grid.RowDefinitions>
                <RowDefinition Height="3*"/>
                <RowDefinition Height="60*"/>
                <RowDefinition Height="3*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="3*"/>
                <ColumnDefinition Width="60*"/>
                <ColumnDefinition Width="3*"/>
            </Grid.ColumnDefinitions>

            <Ellipse Fill="{StaticResource outer}" Grid.RowSpan="3" Grid.ColumnSpan="3" Stroke="Gray" StrokeThickness="1"></Ellipse>
            <!--<Ellipse Fill="#FF3E3E3E" Grid.Row="1" Grid.Column="1">
                <Ellipse.Triggers>
                    <EventTrigger RoutedEvent="MouseEnter">
                        <BeginStoryboard>
                            <Storyboard>
                                <ColorAnimation Storyboard.TargetProperty="Fill.Color" To="#404040" Duration="00:00:0.2"></ColorAnimation>
                            </Storyboard>
                        </BeginStoryboard>
                    </EventTrigger>
                    <EventTrigger RoutedEvent="MouseLeave">
                        <BeginStoryboard>
                            <Storyboard>
                                <ColorAnimation Storyboard.TargetProperty="Fill.Color" To="#FF464646" Duration="00:00:0.2"></ColorAnimation>
                            </Storyboard>
                        </BeginStoryboard>
                    </EventTrigger>
                </Ellipse.Triggers>
            </Ellipse>-->

            <Ellipse Margin="2" Grid.Row="1" Grid.Column="1" Stroke="#FF7F7F7F" StrokeThickness="2">
                <Ellipse.Style>
                    <Style>
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=IsChecked}" Value="True">
                                <Setter Property="Ellipse.Fill" Value="{DynamicResource inner}"></Setter>
                                <DataTrigger.EnterActions>
                                    <BeginStoryboard>
                                        <Storyboard>
                                            <DoubleAnimation Storyboard.TargetProperty="Fill.(GradientBrush.GradientStops)[1].(GradientStop.Offset)" From="0.8" To="1" Duration="0:0:0.5" AutoReverse="True" RepeatBehavior="Forever"/>
                                        </Storyboard>
                                    </BeginStoryboard>
                                </DataTrigger.EnterActions>
                            </DataTrigger>
                            <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=IsChecked}" Value="False">
                                <Setter Property="Ellipse.Fill" Value="{DynamicResource innerOff}"></Setter>
                                <DataTrigger.EnterActions>
                                    <BeginStoryboard>
                                        <Storyboard>
                                            <DoubleAnimation Storyboard.TargetProperty="Fill.(GradientBrush.GradientStops)[1].(GradientStop.Offset)" From="0.5" To="1" Duration="0:0:0.2" AutoReverse="False"/>
                                        </Storyboard>
                                    </BeginStoryboard>
                                </DataTrigger.EnterActions>
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                </Ellipse.Style>
            </Ellipse>
        </Grid>

        <Grid x:Name="gridMask" Visibility="Hidden">
            <Grid.RowDefinitions>
                <RowDefinition Height="11*"/>
                <RowDefinition Height="30*"/>
                <RowDefinition Height="11*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="11*"/>
                <ColumnDefinition Width="30*"/>
                <ColumnDefinition Width="11*"/>
            </Grid.ColumnDefinitions>

            <Ellipse Fill="{StaticResource outer}" Grid.RowSpan="3" Grid.ColumnSpan="3"></Ellipse>
            <Ellipse Fill="#FF464646" Grid.Row="1" Grid.Column="1">
            </Ellipse>

            <Ellipse Fill="#707070" Margin="2" Grid.Row="1" Grid.Column="1">
            </Ellipse>
        </Grid>
    </Grid>
</UserControl>