123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240 |
- <ResourceDictionary
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:cus="clr-namespace:PDF_Master.CustomControl">
- <Style x:Key="PagesView_txtContext" TargetType="{x:Type TextBlock}">
- <Setter Property="FontFamily" Value="Segoe UI" />
- <Setter Property="FontSize" Value="12" />
- </Style>
- <Style x:Key="ViewMode_txtContext" TargetType="{x:Type TextBlock}">
- <Setter Property="FontFamily" Value="Segoe UI" />
- <Setter Property="FontSize" Value="11" />
- </Style>
- <Style x:Key="PagesView_titleContext" TargetType="{x:Type TextBlock}">
- <Setter Property="FontFamily" Value=" Segoe UI Semibold" />
- <Setter Property="FontWeight" Value="SemiBold" />
- <Setter Property="FontSize" Value="14" />
- </Style>
- <!-- style for property seconed title -->
- <Style x:Key="PropertyHeaderLv2" TargetType="{x:Type TextBlock}">
- <Setter Property="FontFamily" Value="Segoe UI" />
- <Setter Property="FontSize" Value="12" />
- <Setter Property="LineHeight" Value="20" />
- <Setter Property="FontWeight" Value="SemiBold" />
- <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.lv2}" />
- </Style>
- <SolidColorBrush x:Key="TextBox.Static.Border" Color="#FFABAdB3" />
- <SolidColorBrush x:Key="TextBox.MouseOver.Border" Color="#FF7EB4EA" />
- <SolidColorBrush x:Key="TextBox.Focus.Border" Color="#FF569DE5" />
- <Style x:Key="TextBoxStyleRadius" TargetType="{x:Type TextBox}">
- <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" />
- <Setter Property="BorderBrush" Value="{StaticResource TextBox.Static.Border}" />
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
- <Setter Property="BorderThickness" Value="1" />
- <Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
- <Setter Property="HorizontalContentAlignment" Value="Left" />
- <Setter Property="FocusVisualStyle" Value="{x:Null}" />
- <Setter Property="AllowDrop" Value="true" />
- <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
- <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type TextBox}">
- <Border
- x:Name="border"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- CornerRadius="4"
- SnapsToDevicePixels="True">
- <ScrollViewer
- x:Name="PART_ContentHost"
- Focusable="false"
- HorizontalScrollBarVisibility="Hidden"
- VerticalScrollBarVisibility="Hidden" />
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsEnabled" Value="false">
- <Setter TargetName="border" Property="Opacity" Value="0.56" />
- </Trigger>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource TextBox.MouseOver.Border}" />
- </Trigger>
- <Trigger Property="IsKeyboardFocused" Value="true">
- <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource TextBox.Focus.Border}" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsInactiveSelectionHighlightEnabled" Value="true" />
- <Condition Property="IsSelectionActive" Value="false" />
- </MultiTrigger.Conditions>
- <Setter Property="SelectionBrush" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}" />
- </MultiTrigger>
- </Style.Triggers>
- </Style>
- <!-- 没有颜色变化的文本框 -->
- <Style x:Key="InnerTextBox" TargetType="{x:Type cus:TextBoxEx}">
- <Setter Property="Background" Value="{StaticResource color.field.bg.def}" />
- <Setter Property="BorderBrush" Value="{StaticResource color.field.border.norm}" />
- <Setter Property="Foreground" Value="Black" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="HorizontalContentAlignment" Value="Left" />
- <Setter Property="BorderThickness" Value="0" />
- <Setter Property="FocusVisualStyle" Value="{x:Null}" />
- <Setter Property="Height" Value="32" />
- <Setter Property="Padding" Value="3,0" />
- <Setter Property="CornerRadius" Value="4" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type cus:TextBoxEx}">
- <Border
- x:Name="border"
- Width="{TemplateBinding Width}"
- Height="{TemplateBinding Height}"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- CornerRadius="{TemplateBinding CornerRadius}"
- SnapsToDevicePixels="True">
- <Grid Margin="{TemplateBinding Padding}">
- <TextBlock
- x:Name="placeholder"
- Padding="{TemplateBinding Padding}"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- FontSize="{TemplateBinding FontSize}"
- Foreground="{TemplateBinding PlaceholderForeground}"
- Text="{TemplateBinding PlaceholderText}"
- Visibility="Collapsed" />
- <Grid VerticalAlignment="Center">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="auto" />
- </Grid.ColumnDefinitions>
- <ScrollViewer
- x:Name="PART_ContentHost"
- Margin="0"
- HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
- Focusable="false"
- Foreground="{TemplateBinding Foreground}"
- HorizontalScrollBarVisibility="Hidden"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
- Style="{x:Null}"
- VerticalScrollBarVisibility="Hidden" />
- <Button
- Name="PART_BtnClear"
- Grid.Column="1"
- Width="16"
- Height="16"
- Margin="9,0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Background="Transparent"
- BorderThickness="0"
- Style="{StaticResource NoColorBtn}"
- Visibility="Collapsed">
- <Path
- Data="M8 15C11.866 15 15 11.866 15 8C15 4.13401 11.866 1 8 1C4.13401 1 1 4.13401 1 8C1 11.866 4.13401 15 8 15ZM11.5303 5.53038L9.06069 8L11.5303 10.4696L10.4697 11.5303L8.00002 9.06066L5.53033 11.5303L4.46967 10.4697L6.93936 8L4.46967 5.53033L5.53033 4.46967L8.00002 6.93934L10.4697 4.46971L11.5303 5.53038Z"
- Fill="#CED0D4"
- Stretch="Uniform" />
- </Button>
- </Grid>
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsEnabled" Value="false">
- <Setter TargetName="border" Property="Opacity" Value="0.56" />
- </Trigger>
- <Trigger Property="Text" Value="{x:Null}">
- <Setter TargetName="placeholder" Property="Visibility" Value="Visible" />
- </Trigger>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="PART_BtnClear" Property="Visibility" Value="Visible" />
- </Trigger>
- <Trigger Property="IsFocused" Value="True">
- <Setter TargetName="PART_BtnClear" Property="Visibility" Value="Visible" />
- </Trigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsFocused" Value="True" />
- <Condition Property="IsError" Value="True" />
- </MultiTrigger.Conditions>
- <MultiTrigger.Setters>
- <Setter TargetName="border" Property="Effect" Value="{StaticResource shadow.error.s}" />
- </MultiTrigger.Setters>
- </MultiTrigger>
- <Trigger Property="IsError" Value="True">
- <Setter Property="BorderBrush" Value="{StaticResource color.sys.border.error}" />
- </Trigger>
- <Trigger Property="Text" Value="">
- <Setter TargetName="placeholder" Property="Visibility" Value="Visible" />
- <Setter TargetName="PART_BtnClear" Property="Visibility" Value="Collapsed" />
- </Trigger>
- <Trigger Property="ShowClose" Value="False">
- <Setter TargetName="PART_BtnClear" Property="Visibility" Value="Collapsed" />
- </Trigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="Text" Value="" />
- <Condition Property="IsMouseOver" Value="True" />
- </MultiTrigger.Conditions>
- <MultiTrigger.Setters>
- <Setter TargetName="PART_BtnClear" Property="Visibility" Value="Collapsed" />
- </MultiTrigger.Setters>
- </MultiTrigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsInactiveSelectionHighlightEnabled" Value="true" />
- <Condition Property="IsSelectionActive" Value="false" />
- </MultiTrigger.Conditions>
- <Setter Property="SelectionBrush" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}" />
- </MultiTrigger>
- </Style.Triggers>
- </Style>
- <Style x:Key="Print_normalTxtStyle" TargetType="TextBox">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate>
- <Grid Width="{TemplateBinding Width}" Height="{TemplateBinding Height}">
- <Border
- Background="{StaticResource color.field.bg.def}"
- BorderBrush="{StaticResource color.field.border.norm}"
- BorderThickness="1"
- CornerRadius="4">
- <ScrollViewer
- x:Name="PART_ContentHost"
- MinHeight="22"
- Margin="8,0,0,0"
- VerticalAlignment="Center"
- Focusable="false"
- HorizontalScrollBarVisibility="Hidden"
- Opacity="1"
- VerticalScrollBarVisibility="Hidden" />
- </Border>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsEnabled" Value="False">
- <Setter Property="Opacity" Value="0.6" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </ResourceDictionary>
|