<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:flyctrl="clr-namespace:FLY.ControlLibrary;assembly=FLY.ControlLibrary"> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/> <ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Converter/Dictionary_MyConv.xaml"/> <ResourceDictionary Source="pack://application:,,,/FLY.Winder.UI.Client;component/Themes/Dictionary_MyStyle.xaml"/> </ResourceDictionary.MergedDictionaries> <Style TargetType="TextBlock" x:Key="TextBlockStyle_Header" BasedOn="{StaticResource TextBlockStyle_FieldHeaderEditable}"> <Setter Property="Margin" Value="30,3"/> <Setter Property="Foreground" Value="White"/> </Style> <Style TargetType="TextBlock" x:Key="TextBlockStyle_RowHeader" BasedOn="{StaticResource TextBlockStyle_FieldHeader}"> <Setter Property="Margin" Value="30,3"/> <Setter Property="Foreground" Value="White"/> <Setter Property="VerticalAlignment" Value="Center"/> </Style> <Style TargetType="TextBox" x:Key="TextBoxStyle_Content" BasedOn="{StaticResource TextBoxStyle_FieldContent}"> <Setter Property="Background" Value="Transparent"/> </Style> <Style TargetType="TextBlock" x:Key="TextBlockStyle_Content" BasedOn="{StaticResource TextBlockStyle_FieldContent}"> </Style> <SolidColorBrush x:Key="Color_row0" Color="LightGray"/> <Style TargetType="Rectangle" x:Key="RectStyle_RowHeaderEditBackground"> <Setter Property="Fill" Value="{StaticResource Color_theme_activity}"/> <Setter Property="Stroke" Value="{StaticResource Color_theme_static}"/> </Style> <Style TargetType="Rectangle" x:Key="RectStyle_RowHeaderBackground"> <Setter Property="Fill" Value="{StaticResource Color_theme_static}"/> <Setter Property="Stroke" Value="{StaticResource Color_theme_activity}"/> </Style> <Style TargetType="StackPanel" x:Key="SpStyle_Editable"> <Setter Property="Orientation" Value="Horizontal"/> <Setter Property="Background" Value="#FF80C3EE"/> <Setter Property="Margin" Value="5"/> </Style> <Style TargetType="StackPanel" x:Key="SpStyle_ReadOnly"> <Setter Property="Orientation" Value="Horizontal"/> <Setter Property="Margin" Value="5"/> </Style> <Style TargetType="flyctrl:NoToggleButton" BasedOn="{StaticResource NoToggleButtonStyle}" x:Key="NoToggleButton_Separate" > <Setter Property="OffLabel" Value="分离"/> <Setter Property="OffBrush" Value="DarkRed"/> <Setter Property="OnLabel" Value="闭合"/> </Style> <!--<Style TargetType="Button" x:Key="ButtonStyle_Separate" > <Setter Property="Margin" Value="5"/> <Setter Property="HorizontalContentAlignment" Value="Center"/> <Setter Property="VerticalContentAlignment" Value="Center"/> <Setter Property="Padding" Value="1"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type Button}"> <Canvas x:Name="canvas" Height="55" Width="110" Background="{StaticResource Color_theme_activity}"> <Rectangle x:Name="Path_block" Height="45" Width="24" Margin="5" Fill="White" Canvas.Right="0" /> <StackPanel x:Name="SP_Text" Orientation="Horizontal" Margin="20,15" > <TextBlock x:Name="TB_OnOff" Text="闭合" Foreground="White" FontSize="24" FontFamily="YouYuan"/> </StackPanel> </Canvas> <ControlTemplate.Triggers> <DataTrigger Binding="{Binding Tag,RelativeSource={RelativeSource Mode=Self}}" Value="False"> <Setter TargetName="TB_OnOff" Property="Text" Value="分离"/> <Setter TargetName="Path_block" Property="Canvas.Left" Value="0"/> <Setter TargetName="SP_Text" Property="Canvas.Right" Value="0"/> <Setter TargetName="canvas" Property="Background" Value="DarkRed"/> </DataTrigger> <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> </Style>--> <!--<Style TargetType="Button" x:Key="ButtonStyle_toggle" > <Setter Property="Margin" Value="5"/> <Setter Property="HorizontalContentAlignment" Value="Center"/> <Setter Property="VerticalContentAlignment" Value="Center"/> <Setter Property="Padding" Value="1"/> <Setter Property="Width" Value="110"/> <Setter Property="Background" Value="{StaticResource Color_theme_static}" /> <Setter Property="Foreground" Value="{StaticResource Color_theme_activity}" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type Button}"> <Border x:Name="canvas" Height="55" Width="{TemplateBinding Width}" Background="{TemplateBinding Background}"> <Grid> <Rectangle x:Name="Path_block" Height="45" Width="24" Margin="5" Fill="White" HorizontalAlignment="Left"/> <StackPanel x:Name="SP_Text" Orientation="Horizontal" Margin="20,15" HorizontalAlignment="Right"> <TextBlock x:Name="TB_OnOff" Text="{TemplateBinding Content}" Foreground="White" FontSize="24" FontFamily="YouYuan"/> </StackPanel> </Grid> </Border> <ControlTemplate.Triggers> <DataTrigger Binding="{Binding Tag,RelativeSource={RelativeSource Mode=Self}}" Value="True"> <Setter TargetName="Path_block" Property="HorizontalAlignment" Value="Right"/> <Setter TargetName="SP_Text" Property="HorizontalAlignment" Value="Left"/> <Setter TargetName="canvas" Property="Background" Value="{Binding Foreground,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=Button}}" /> </DataTrigger> <Trigger Property="IsPressed" Value="true"> <Setter Property="Opacity" Value="0.5"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style TargetType="ToggleButton" x:Key="ToggleButtonStyle" > <Setter Property="Margin" Value="5"/> <Setter Property="HorizontalContentAlignment" Value="Center"/> <Setter Property="VerticalContentAlignment" Value="Center"/> <Setter Property="Padding" Value="1"/> <Setter Property="Width" Value="110"/> <Setter Property="Background" Value="{StaticResource Color_theme_static}" /> <Setter Property="Foreground" Value="{StaticResource Color_theme_activity}" /> <Setter Property="IsEnabled" Value="False" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ToggleButton}"> <Border x:Name="canvas" Height="55" Width="{TemplateBinding Width}" Background="{TemplateBinding Background}"> <Grid> <Rectangle x:Name="Path_block" Height="45" Width="24" Margin="5" Fill="White" HorizontalAlignment="Left"/> <StackPanel x:Name="SP_Text" Orientation="Horizontal" Margin="20,15" HorizontalAlignment="Right"> <TextBlock x:Name="TB_OnOff" Text="{TemplateBinding Content}" Foreground="White" FontSize="24" FontFamily="YouYuan"/> </StackPanel> </Grid> </Border> <ControlTemplate.Triggers> <Trigger Property="IsChecked" Value="True"> <Setter TargetName="Path_block" Property="HorizontalAlignment" Value="Right"/> <Setter TargetName="SP_Text" Property="HorizontalAlignment" Value="Left"/> <Setter TargetName="canvas" Property="Background" Value="{Binding Foreground,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ButtonBase}}" /> </Trigger> <Trigger Property="IsPressed" Value="true"> <Setter Property="Opacity" Value="0.5"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style>--> </ResourceDictionary>