zoukankan      html  css  js  c++  java
  • 开始暂停按钮样式

    <Style x:Key="ToggleButtonStyle" TargetType="{x:Type ToggleButton}">
                <Setter Property="Background" Value="Transparent"/>
                <Setter Property="Foreground" Value="Black"/>
                <Setter Property="BorderBrush" Value="Transparent"/>
                <Setter Property="BorderThickness" Value="2"/>
                <Setter Property="VerticalContentAlignment" Value="Center"/>
                <Setter Property="HorizontalContentAlignment" Value="Center"/>
                <Setter Property="FontSize" Value="80px"/>
     
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type ToggleButton}">
                            <Grid>
                                <Border x:Name="PART_Background" CornerRadius="1000"
                                        Background="{TemplateBinding Background}"
                                        BorderBrush="{TemplateBinding BorderBrush}"
                                        BorderThickness="{TemplateBinding BorderThickness}">
                                    <ContentPresenter x:Name="PART_Content" RecognizesAccessKey="True"
                                                                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                                                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                </Border>
                            </Grid>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsKeyboardFocused" Value="true"/>
                                <Trigger Property="IsChecked" Value="true">
                                    <Setter Property="Visibility" TargetName="PART_Content" Value="Visible"/>
                                    <Setter Property="Background" TargetName="PART_Background" >
                                        <Setter.Value>
                                            <!--<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                                    <GradientStop Color="#FFFFFFFF" Offset="0"></GradientStop>
                                                    <GradientStop Color="#FFE1D772" Offset="1"></GradientStop>
                                                </LinearGradientBrush>-->
                                            <RadialGradientBrush GradientOrigin="0.5,0.01">
                                                <GradientStop Color="#EFF7FF99" Offset="0.01"/>
                                                <GradientStop Color="#EFE1D772" Offset="1"/>
                                            </RadialGradientBrush>
     
     
                                        </Setter.Value>
                                    </Setter>
                                    <Setter Property="BorderBrush" TargetName="PART_Background"  >
                                        <Setter.Value>
                                            <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                                <GradientStop Color="#DED9A4"></GradientStop>
                                                <GradientStop Color="#D4C311" Offset="1"></GradientStop>
                                            </LinearGradientBrush>
                                        </Setter.Value>
                                    </Setter>
                                    <Setter Property="Content" >
                                        <Setter.Value>
                                            <Grid>
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="50*"></ColumnDefinition>
                                                    <ColumnDefinition Width="50*"></ColumnDefinition>
                                                </Grid.ColumnDefinitions>
                                                <Line X1="10" X2="10" Y1="0" Y2="110"  Stroke="#E6D318" StrokeThickness="14" Grid.Column="0" ></Line>
                                                <Line X1="26" X2="26" Y1="0" Y2="110" Stroke="#E6D318" StrokeThickness="14" Grid.Column="1"  ></Line>
                                            </Grid>
                                        </Setter.Value>
                                    </Setter>
                                </Trigger>
                                <Trigger Property="IsEnabled" Value="false">
                                    <Setter Property="Foreground" Value="#ADADAD"/>
                                </Trigger>
                                <DataTrigger></DataTrigger>
                            </ControlTemplate.Triggers>
     
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>

  • 相关阅读:
    c# 泛型集合Dictionary
    int+? int后带问题是什么意思,请看内容。
    在ASP.NET中实现Url ReWriting 示例
    #DataDirectory是什么意思呢?
    vs2008生成自定义dll,VS2008发布、生成网站时设置固定的dll文件名?
    平台安装注意事项
    快速开发平台程序运行环境
    快速开发平台介绍(动态)
    快速开发平台程序安装包20120612
    JavaFx 2.0总结
  • 原文地址:https://www.cnblogs.com/lipengjiushiwo/p/8664665.html
Copyright © 2011-2022 走看看