123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- <ResourceDictionary
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:cus="clr-namespace:PDF_Office.CustomControl"
- xmlns:local="clr-namespace:PDF_Office">
- <!-- style for customControl -->
- <Style TargetType="{x:Type cus:DialogContent}">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type cus:DialogContent}">
- <Border Background="White" CornerRadius="8">
- <Grid Background="Transparent">
- <Grid.RowDefinitions>
- <RowDefinition Height="48" />
- <RowDefinition Height="*" />
- <RowDefinition Height="64" />
- </Grid.RowDefinitions>
- <Border Background="Transparent" BorderThickness="0,0,0,1">
- <Border.BorderBrush>
- <SolidColorBrush Opacity="0.2" Color="Gray" />
- </Border.BorderBrush>
- <TextBlock
- Margin="16,0,0,0"
- VerticalAlignment="Center"
- FontSize="16"
- FontWeight="SemiBold"
- Text="{TemplateBinding Header}" />
- </Border>
- <ContentPresenter Grid.Row="1" Content="{TemplateBinding Content}" />
- <Border Grid.Row="2" BorderThickness="0,1,0,0">
- <Border.BorderBrush>
- <SolidColorBrush Opacity="0.2" Color="Gray" />
- </Border.BorderBrush>
- <ContentControl Content="{TemplateBinding BottmBar}" />
- </Border>
- </Grid>
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style 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="BorderThickness" Value="1" />
- <Setter Property="FocusVisualStyle" Value="{x:Null}" />
- <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"
- Margin="5,0,0,0"
- FontSize="{TemplateBinding FontSize}"
- Foreground="{TemplateBinding PlaceholderForeground}"
- Text="{TemplateBinding PlaceholderText}"
- Visibility="Collapsed" />
- <ScrollViewer
- x:Name="PART_ContentHost"
- Margin="0,0,25,0"
- Padding="8,1,0,0"
- Focusable="false"
- Foreground="{TemplateBinding Foreground}"
- HorizontalScrollBarVisibility="Hidden"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
- Style="{x:Null}"
- VerticalScrollBarVisibility="Hidden" />
- <Button
- Name="PART_BtnClear"
- 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>
- </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="Text" Value="">
- <Setter TargetName="placeholder" Property="Visibility" Value="Visible" />
- </Trigger>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="PART_BtnClear" Property="Visibility" Value="Visible" />
- </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>
- </ResourceDictionary>
|