<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:FLY.Winder.UI.Client.UiModule" xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/> <ResourceDictionary Source="pack://application:,,,/FLY.Winder.UI.Client;component/Themes/Dictionary_MyStyle.xaml"/> </ResourceDictionary.MergedDictionaries> <SolidColorBrush x:Key="Color_background" Color="#FFf1f1f1"/> <Thickness x:Key="ControlMargin">10</Thickness> <Style TargetType="iconPacks:PackIconMaterial"> <Setter Property="Width" Value="auto"/> <Setter Property="Height" Value="auto"/> <Setter Property="HorizontalAlignment" Value="Center"/> <Setter Property="VerticalAlignment" Value="Center"/> </Style> <Style TargetType="Button" x:Key="ButtonStyle_resizeIcon"> <Setter Property="Foreground" Value="{StaticResource Color_theme_static}"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type Button}"> <Border Background="Transparent"> <Grid x:Name="grid" Style="{StaticResource GridStyle_ButtonShadow}"> <ContentPresenter x:Name="path" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Width="50" Height="{Binding RelativeSource={RelativeSource Mode=Self},Path=Width}" HorizontalAlignment="Center" VerticalAlignment="Center" /> </Grid> </Border> <ControlTemplate.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter Property="Opacity" Value="0.7"/> </Trigger> <Trigger Property="IsPressed" Value="True"> <Setter TargetName="path" Property="Width" Value="46"/> <Setter TargetName="grid" Property="Margin" Value="2"/> <Setter Property="Foreground" Value="{StaticResource Color_theme_activity}"/> <Setter TargetName="grid" Property="Effect" Value="{x:Null}" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style TargetType="{x:Type ToggleButton}" x:Key="ToggleButtonStyle_hand" > <Setter Property="HorizontalContentAlignment" Value="Center"/> <Setter Property="VerticalContentAlignment" Value="Center"/> <Setter Property="Padding" Value="1"/> <Setter Property="Foreground" Value="{StaticResource Color_theme_static}"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ToggleButton}"> <Grid x:Name="grid" HorizontalAlignment="Center"> <iconPacks:PackIconMaterial x:Name="path" Kind="HandRight" Width="50" Height="{Binding RelativeSource={RelativeSource Mode=Self},Path=Width}"/> <TextBlock x:Name="blocka" Text="A" Foreground="Red" HorizontalAlignment="Right" VerticalAlignment="Bottom" FontSize="30" Margin="0,0,0,-10" Visibility="Hidden"/> </Grid> <ControlTemplate.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter Property="Opacity" Value="0.7"/> </Trigger> <Trigger Property="IsPressed" Value="True"> <Setter TargetName="path" Property="Width" Value="46"/> <Setter TargetName="grid" Property="Margin" Value="2"/> <Setter Property="Foreground" Value="{StaticResource Color_theme_activity}"/> </Trigger> <Trigger Property="IsChecked" Value="True"> <Setter TargetName="blocka" Property="Visibility" Value="Visible"/> <Setter Property="Foreground" Value="{StaticResource Color_theme_activity}"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style TargetType="TextBlock" x:Key="TextBlockStyle_hand" BasedOn="{StaticResource TextBlockStyle_FieldHeader}"> <Setter Property="Text" Value="抓手手动"/> <Style.Triggers> <DataTrigger Binding="{Binding Tag,RelativeSource={RelativeSource Mode=Self}}" Value="True"> <Setter Property="Text" Value="抓手自动"/> </DataTrigger> </Style.Triggers> </Style> </ResourceDictionary>