Bläddra i källkod

主页打开文件-按钮样式优化

liyijie 1 år sedan
förälder
incheckning
93a0867901

+ 60 - 0
PDF Office/Styles/ButtonStyle.xaml

@@ -647,4 +647,64 @@
         </Style.Triggers>
     </Style>
 
+    <Style x:Key="OpenPDFFileBtn" TargetType="{x:Type Button}">
+        <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}" />
+        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
+        <Setter Property="BorderThickness" Value="2" />
+        <Setter Property="HorizontalContentAlignment" Value="Center" />
+        <Setter Property="VerticalContentAlignment" Value="Center" />
+        <Setter Property="Background" Value="Transparent" />
+        <Setter Property="BorderBrush" Value="{StaticResource color.sys.border.neutral.lv1}" />
+        <Setter Property="IsTabStop" Value="False" />
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="{x:Type Button}">
+                    <Border
+                        x:Name="border"
+                        CornerRadius="8"
+                        Background="{TemplateBinding Background}"
+                        BorderThickness="{TemplateBinding BorderThickness}"
+                        SnapsToDevicePixels="true">
+                        <Border.BorderBrush>
+                            <VisualBrush>
+                                <VisualBrush.Visual>
+                                    <Rectangle StrokeDashArray="4 2" RadiusX="8" RadiusY="8" Stroke="{TemplateBinding BorderBrush}"
+Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualWidth}"
+Height="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualHeight}">
+                                    </Rectangle>
+                                </VisualBrush.Visual>
+                            </VisualBrush>
+                        </Border.BorderBrush>
+                        <ContentPresenter
+                            x:Name="contentPresenter"
+                            Margin="{TemplateBinding Padding}"
+                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
+                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
+                            Focusable="False"
+                            RecognizesAccessKey="True"
+                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
+                    </Border>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+        <Style.Triggers>
+            <Trigger Property="IsDefaulted" Value="true">
+                <Setter Property="Background" Value="White" />
+            </Trigger>
+            <Trigger Property="IsMouseOver" Value="true">
+                <Setter Property="Background" Value="{StaticResource color.item-state.hov.bg}" />
+                <Setter Property="BorderBrush" Value="{StaticResource color.field.border.hov}" />
+            </Trigger>
+            <Trigger Property="IsPressed" Value="true">
+                <Setter Property="Background" Value="{StaticResource color.item-state.hov.bg}" />
+                <Setter Property="BorderBrush" Value="{StaticResource color.field.border.hov}" />
+            </Trigger>
+            <Trigger Property="IsEnabled" Value="false">
+                <Setter Property="Background" Value="{StaticResource color.field.bg.dis}" />
+                <Setter Property="BorderBrush" Value="{StaticResource color.field.border.norm}" />
+                <Setter Property="Foreground" Value="{StaticResource color.icon.base.neutral.dis}" />
+            </Trigger>
+        </Style.Triggers>
+    </Style>
+
 </ResourceDictionary>

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 3 - 3
PDF Office/Views/HomePanel/PDFTools/HomeFilesContent.xaml