WorkTool/Styles/InputGroup.xaml

(开头部分) 30KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="pack://application:,,,/WorkTool;component/Styles/Button.xaml"></ResourceDictionary>
        <ResourceDictionary Source="pack://application:,,,/WorkTool;component/Styles/Label.xaml"></ResourceDictionary>
    </ResourceDictionary.MergedDictionaries>
    <!--按钮-->
    <Style x:Key="InputGroupButtonBaseStyle" BasedOn="{StaticResource ButtonBaseBaseStyle}" TargetType="{x:Type Button}">
        <Setter Property="Background">
            <Setter.Value>
                <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                    <GradientStop Offset="0" Color="#fff"></GradientStop>
                    <GradientStop Offset="1" Color="#E0E0E0"></GradientStop>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush-Default1}"/>
        <Setter Property="Foreground" Value="{DynamicResource Foreground-Default}"/>
    </Style>
    <Style x:Key="InputGroupButtonLeftStyle" BasedOn="{StaticResource InputGroupButtonBaseStyle}" TargetType="{x:Type Button}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Grid>
                        <Border x:Name="border" CornerRadius="4,0,0,4" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="0" SnapsToDevicePixels="true">
                            <Border.Effect>
                                <DropShadowEffect x:Name="dse" BlurRadius="8" ShadowDepth="0" Color="#9966afe9" Opacity="0"/>
                            </Border.Effect>
                            <!--点击时显示-->
                            <Grid x:Name="PressedLayer" Visibility="Collapsed">
                                <Rectangle Height="3" VerticalAlignment="Top" Fill="#1F000000" RadiusX="4" RadiusY="4">
                                    <Rectangle.Effect>
                                        <BlurEffect Radius="5"></BlurEffect>
                                    </Rectangle.Effect>
                                </Rectangle>
                                <Border CornerRadius="4" BorderBrush="#1F000000" BorderThickness="1,0">
                                    <Border.Effect>
                                        <BlurEffect Radius="3"></BlurEffect>
                                    </Border.Effect>
                                </Border>
                            </Grid>
                        </Border>
                        <Border BorderThickness="{TemplateBinding BorderThickness}">
                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                        </Border>
                        <!--禁用时显示-->
                        <Rectangle x:Name="EnabledLayer" Fill="#4CFFFFFF" RadiusX="4" RadiusY="4" Visibility="Collapsed"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Background" Value="#e6e6e6"/>
                            <Setter Property="BorderBrush" Value="#adadad"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Setter Property="Panel.ZIndex" Value="1"/>
                            <Setter TargetName="PressedLayer" Property="Visibility" Value="Visible"/>
                            <Setter TargetName="border" Property="BorderBrush" Value="#66afe9"/>
                            <Trigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
后面还有 398 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。