• WPF/Silverlight Button Style that looks exactly like the IE7 Foward/Back buttons


    http://social.msdn.microsoft.com/Forums/en-SG/wpf/thread/5b614ec5-9366-44f2-ad35-5865fa86547e

            <Button>
                <Button.Template>
                    <ControlTemplate TargetType="Button">
                        <Grid Height="24" Width="24" Background="#00FFFFFF">
                            <Ellipse Name="Circle" StrokeThickness="1">
                                <Ellipse.Fill>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <LinearGradientBrush.GradientStops>
                                            <GradientStop Offset="0" Color="#FFFFFFFF" />
                                            <GradientStop Offset="0.1" Color="#FFCCD4E9" />
                                            <GradientStop Offset="0.47" Color="#FF4881D2" />
                                            <GradientStop Offset="0.47" Color="#FF001A5A" />
                                            <GradientStop Offset="0.7" Color="#FF007BD6" />
                                            <GradientStop Offset="0.85" Color="#FF54DAFF" />
                                            <GradientStop Offset="0.95" Color="#FF86FFFF" />
                                            <GradientStop Offset="1" Color="#FFFFFFFF" />
                                        </LinearGradientBrush.GradientStops>
                                    </LinearGradientBrush>
                                </Ellipse.Fill>
                                <Ellipse.Stroke>
                                    <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                                        <LinearGradientBrush.GradientStops>
                                            <GradientStop Offset="0" Color="#FF6C90C4" />
                                            <GradientStop Offset="0.5" Color="#FF315BB4" />
                                            <GradientStop Offset="0.5" Color="#FF002091" />
                                            <GradientStop Offset="1" Color="#FF08377C" />
                                        </LinearGradientBrush.GradientStops>
                                    </LinearGradientBrush>
                                </Ellipse.Stroke>
                            </Ellipse>
                            <Path  RenderTransformOrigin="0.5,0" Data="M0.37,7.69L5.74,14.2A1.5,1.5,0,1,0,10.26,12.27L8.42,10.42 14.9,10.39A1.5,1.5,0,1,0,14.92,5.87L8.44,5.9 10.31,4.03A1.5,1.5,0,1,0,5.79,1.77z" HorizontalAlignment="Center" Name="Arrow" VerticalAlignment="Center" StrokeThickness="0.75">
                                <Path.Fill>
                                    <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                                        <LinearGradientBrush.GradientStops>
                                            <GradientStop Offset="0.5" Color="#FFFFFFFF" />
                                            <GradientStop Offset="0.5" Color="#FFEEEEEE" />
                                            <GradientStop Offset="1" Color="#FFB0B0B0" />
                                        </LinearGradientBrush.GradientStops>
                                    </LinearGradientBrush>
                                </Path.Fill>
                                <Path.Stroke>
                                    <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                                        <LinearGradientBrush.GradientStops>
                                            <GradientStop Offset="0" Color="#FF8AB1FB" />
                                            <GradientStop Offset="1" Color="#FF002874" />
                                        </LinearGradientBrush.GradientStops>
                                    </LinearGradientBrush>
                                </Path.Stroke>
                            </Path>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="UIElement.IsEnabled" Value="false">
                                <Setter Property="Shape.Fill" TargetName="Circle">
                                    <Setter.Value>
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                            <LinearGradientBrush.GradientStops>
                                                <GradientStop Offset="0" Color="#FFFFFFFF" />
                                                <GradientStop Offset="0.5" Color="#FFEBEEF5" />
                                                <GradientStop Offset="0.5" Color="#FFD8DDEB" />
                                                <GradientStop Offset="1" Color="#FFDFE2F0" />
                                            </LinearGradientBrush.GradientStops>
                                        </LinearGradientBrush>
                                    </Setter.Value>
                                </Setter>
                                <Setter Property="Shape.Stroke" TargetName="Circle">
                                    <Setter.Value>
                                        <SolidColorBrush>#FFB5BACE</SolidColorBrush>
                                    </Setter.Value>
                                </Setter>
                                <Setter Property="Shape.Stroke" TargetName="Arrow">
                                    <Setter.Value>
                                        <SolidColorBrush>#B0B5BACE</SolidColorBrush>
                                    </Setter.Value>
                                </Setter>
                                <Setter Property="Shape.Fill" TargetName="Arrow">
                                    <Setter.Value>
                                        <SolidColorBrush>#D0FFFFFF</SolidColorBrush>
                                    </Setter.Value>
                                </Setter>
                            </Trigger>
                            <Trigger Property="UIElement.IsMouseOver" Value="true">
                                <Setter Property="Shape.Fill" TargetName="Circle">
                                    <Setter.Value>
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                            <LinearGradientBrush.GradientStops>
                                                <GradientStop Offset="0" Color="#FFFFFFFF" />
                                                <GradientStop Offset="0.1" Color="#FFDFEDF9" />
                                                <GradientStop Offset="0.47" Color="#FF3086E1" />
                                                <GradientStop Offset="0.47" Color="#FF003B91" />
                                                <GradientStop Offset="0.7" Color="#FF1793EF" />
                                                <GradientStop Offset="0.85" Color="#FF5AD4FF" />
                                                <GradientStop Offset="0.95" Color="#FFBDFFFF" />
                                                <GradientStop Offset="1" Color="#FFFFFFFF" />
                                            </LinearGradientBrush.GradientStops>
                                        </LinearGradientBrush>
                                    </Setter.Value>
                                </Setter>

                            </Trigger>
                            <Trigger Property="ButtonBase.IsPressed" Value="True">
                                <Setter Property="Shape.Fill" TargetName="Circle">
                                    <Setter.Value>
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                            <LinearGradientBrush.GradientStops>
                                                <GradientStop Offset="0" Color="#FFC0D2F5" />
                                                <GradientStop Offset="0.47" Color="#FF5E7A9C" />
                                                <GradientStop Offset="0.47" Color="#FF00062D" />
                                                <GradientStop Offset="0.7" Color="#FF005F9F" />
                                                <GradientStop Offset="0.85" Color="#FF1FA4E2" />
                                                <GradientStop Offset="0.95" Color="#FF61DAFF" />
                                                <GradientStop Offset="1" Color="#FF48CFFF" />
                                            </LinearGradientBrush.GradientStops>
                                        </LinearGradientBrush>
                                    </Setter.Value>
                                </Setter>

                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Button.Template>
            </Button>

  • 相关阅读:
    右键菜单:锁到任务栏丢失 修复
    检测到鼠标时自动禁用触摸板 (注:仅适用于个别笔记本)
    清除右键菜单CMD入口
    VBS编辑字段
    VBS创建数据表
    VBS创建数据库
    QTP操作论坛回复编辑框----webelement
    数字排序
    对应键盘的ASCII码(备忘)
    将字符串打乱输出
  • 原文地址:https://www.cnblogs.com/rgqancy/p/1849986.html
Copyright © 2020-2023  润新知