浏览代码

Disable focus to fix possible errors

Ruben 5 年之前
父节点
当前提交
a2fff6f3fc
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      PicView/Configs/Styles/Button.xaml

+ 8 - 0
PicView/Configs/Styles/Button.xaml

@@ -5,6 +5,8 @@
         <Setter Property="Background" Value="Transparent" />
         <Setter Property="Background" Value="Transparent" />
         <Setter Property="Foreground" Value="{StaticResource MainColorBrush}" />
         <Setter Property="Foreground" Value="{StaticResource MainColorBrush}" />
         <Setter Property="BorderBrush" Value="Transparent" />
         <Setter Property="BorderBrush" Value="Transparent" />
+        <Setter Property="Focusable" Value="False" />
+        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
         <Setter Property="Template">
         <Setter Property="Template">
             <Setter.Value>
             <Setter.Value>
                 <ControlTemplate TargetType="{x:Type Button}">
                 <ControlTemplate TargetType="{x:Type Button}">
@@ -22,6 +24,8 @@
         <Setter Property="Background" Value="Transparent" />
         <Setter Property="Background" Value="Transparent" />
         <Setter Property="Foreground" Value="{StaticResource MainColorBrush}" />
         <Setter Property="Foreground" Value="{StaticResource MainColorBrush}" />
         <Setter Property="BorderBrush" Value="Transparent" />
         <Setter Property="BorderBrush" Value="Transparent" />
+        <Setter Property="Focusable" Value="False" />
+        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
         <Setter Property="Template">
         <Setter Property="Template">
             <Setter.Value>
             <Setter.Value>
                 <ControlTemplate TargetType="{x:Type CheckBox}">
                 <ControlTemplate TargetType="{x:Type CheckBox}">
@@ -41,6 +45,8 @@
         <Setter Property="Padding" Value="15,5" />
         <Setter Property="Padding" Value="15,5" />
         <Setter Property="Height" Value="32" />
         <Setter Property="Height" Value="32" />
         <Setter Property="BorderThickness" Value="0" />
         <Setter Property="BorderThickness" Value="0" />
+        <Setter Property="Focusable" Value="False" />
+        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
         <Setter Property="Template">
         <Setter Property="Template">
             <Setter.Value>
             <Setter.Value>
                 <ControlTemplate TargetType="{x:Type Button}">
                 <ControlTemplate TargetType="{x:Type Button}">
@@ -68,6 +74,8 @@
         <Setter Property="FontFamily" Value="/PicView;component/Resources/fonts/#Aller" />
         <Setter Property="FontFamily" Value="/PicView;component/Resources/fonts/#Aller" />
         <Setter Property="Width" Value="101" />
         <Setter Property="Width" Value="101" />
         <Setter Property="Height" Value="40" />
         <Setter Property="Height" Value="40" />
+        <Setter Property="Focusable" Value="False" />
+        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
         <Setter Property="BorderThickness" Value="1" />
         <Setter Property="BorderThickness" Value="1" />
         <Setter Property="BorderBrush" Value="{StaticResource BorderBrush}" />
         <Setter Property="BorderBrush" Value="{StaticResource BorderBrush}" />
         <Setter Property="Effect">
         <Setter Property="Effect">