Commit f03ef3eb authored by 潘栩锋's avatar 潘栩锋 🚴

修复 解决 √,标题的返回按钮 一个布局出现第2次,第1个就会没有的问题

parent c1f8800f
......@@ -83,21 +83,33 @@
<!--圆形确定按钮,绿色, 很多界面使用,例如扫描图 设置界面 -->
<Style TargetType="Button" x:Key="Styles.Button.Apply" BasedOn="{StaticResource Styles.Button.Empty}">
<Setter Property="Foreground" Value="#FF31AE15"/>
<Setter Property="Margin" Value="{StaticResource ControlMargin}"/>
<Setter Property="HorizontalAlignment" Value="Right"/>
<Setter Property="VerticalAlignment" Value="Top"/>
<Setter Property="Content">
<Style TargetType="Button" x:Key="Styles.Button.Apply" >
<Setter Property="Template">
<Setter.Value>
<Grid>
<Ellipse Fill="White" Height="90" Width="90"/>
<iconPacks:PackIconMaterial Kind="CheckCircle" HorizontalAlignment="Center" VerticalAlignment="Center" Width="80" Height="auto" />
</Grid>
<ControlTemplate TargetType="{x:Type Button}">
<Grid>
<Ellipse Fill="White" Height="90" Width="90"/>
<iconPacks:PackIconMaterial Kind="CheckCircle"
HorizontalAlignment="Center" VerticalAlignment="Center" Width="80" Height="auto"
Foreground="#FF31AE15"
/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsKeyboardFocused" Value="true">
</Trigger>
<Trigger Property="IsEnabled" Value="false">
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Opacity" Value="0.5"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Margin" Value="{StaticResource ControlMargin}"/>
<Setter Property="HorizontalAlignment" Value="Right"/>
<Setter Property="VerticalAlignment" Value="Top"/>
</Style>
<!--矩形图标按钮 内部为iconPacks的按键,下方不可带文字 -->
<Style TargetType="Button" x:Key="Styles.Button.Icon.Rectangle">
<Setter Property="Template">
......
......@@ -59,17 +59,41 @@
<Setter Property="FontSize" Value="30" />
</Style>
<!--标题区,左边的后退键(蓝底白图标)-->
<Style TargetType="Button" x:Key="Styles.TitleBar.BackButton" BasedOn="{StaticResource Styles.Button.Empty}">
<Style TargetType="Button" x:Key="Styles.TitleBar.BackButton" >
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Background="{TemplateBinding Background}"
Height="{TemplateBinding Height}"
Width="{TemplateBinding Width}"
>
<iconPacks:PackIconMaterial Kind="ArrowLeftThick" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsKeyboardFocused" Value="true">
</Trigger>
<Trigger Property="IsEnabled" Value="false">
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Opacity" Value="0.5"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="Width" Value="80"/>
<Setter Property="Height" Value="80"/>
<Setter Property="Margin" Value="0,24"/>
<Setter Property="Foreground" Value="{StaticResource Brushes.TitleBar.Foreground}"/>
<Setter Property="Background" Value="{StaticResource Brushes.TitleBar.Background}"/>
<Setter Property="Content">
<Setter.Value>
<iconPacks:PackIconMaterial Kind="ArrowLeftThick" />
</Setter.Value>
</Setter>
<Style.Resources>
<Style TargetType="iconPacks:PackIconMaterial" >
<Setter Property="Width" Value="60"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment