WorkTool/Styles/FormControl.xaml

(开头部分) 46KB

这里只显示每个文件的开头 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/BaseStyle.xaml"></ResourceDictionary>
    </ResourceDictionary.MergedDictionaries>
    <!--form-control 源码行数:2356-2391-->
    <!--TextBox PasswordBox ComboBox CheckBox RadioButton-->
    <!--基样式-->
    <Style x:Key="FormControlBaseStyle" BasedOn="{StaticResource BaseStyle}" TargetType="{x:Type Control}">
        <Setter Property="Height" Value="{DynamicResource DefaultControlHeight}"/>
        <Setter Property="Padding" Value="{DynamicResource DefaultControlPadding}"/>
        <Setter Property="Background" Value="{DynamicResource FormControlBackground}"/>
        <Setter Property="BorderBrush" Value="{DynamicResource FormControlBorderBrush}"/>
        <Setter Property="Foreground" Value="{DynamicResource FormControlForeground}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Control}">
                    <Grid>
                        <Border x:Name="border" CornerRadius="4" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
                            <Border.Effect>
                                <DropShadowEffect x:Name="dse" BlurRadius="8" ShadowDepth="0" Color="#9966afe9" Opacity="0"/>
                            </Border.Effect>
                            <Rectangle Height="1" VerticalAlignment="Top" Stroke="#000000" Opacity="0.1">
                                <Rectangle.Effect>
                                    <BlurEffect Radius="1"/>
                                </Rectangle.Effect>
                            </Rectangle>
                        </Border>
                        <!--内容放在外面 因为阴影会对内容产生影响 Margin绑定BorderThickness是为了让padding没有误差-->
                        <ScrollViewer x:Name="PART_ContentHost" Margin="0" Padding="0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused" Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="dse" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.15">
                                            <DoubleAnimation.EasingFunction>
                                                <BackEase EasingMode="EaseInOut" />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="dse" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.15">
                                            <DoubleAnimation.EasingFunction>
                                                <BackEase EasingMode="EaseInOut" />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.ExitActions>
                            <Setter Property="BorderBrush" Value="#66afe9"/>
                        </Trigger>
后面还有 643 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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