add FlowDocumentReader Style
This commit is contained in:
1 parent
28639a263d
commit
955894e265
21 files changed
+355
-197
No files matched your search
@@ -159,6 +159,15 @@ namespace HandyControl.Properties.Langs {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 查找 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string Find {
|
||||
get {
|
||||
return ResourceManager.GetString("Find", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 格式错误 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -267,6 +276,15 @@ namespace HandyControl.Properties.Langs {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 页面模式 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string PageMode {
|
||||
get {
|
||||
return ResourceManager.GetString("PageMode", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 下午 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -294,6 +312,15 @@ namespace HandyControl.Properties.Langs {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 滚动模式 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string ScrollMode {
|
||||
get {
|
||||
return ResourceManager.GetString("ScrollMode", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 提示 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -312,6 +339,15 @@ namespace HandyControl.Properties.Langs {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 双页模式 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string TwoPageMode {
|
||||
get {
|
||||
return ResourceManager.GetString("TwoPageMode", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 未知 的本地化字符串。
|
||||
/// </summary>
|
||||
|
||||
@@ -216,4 +216,16 @@
|
||||
<data name="NextPage" xml:space="preserve">
|
||||
<value>Next page</value>
|
||||
</data>
|
||||
<data name="PageMode" xml:space="preserve">
|
||||
<value>Page mode</value>
|
||||
</data>
|
||||
<data name="TwoPageMode" xml:space="preserve">
|
||||
<value>Two page mode</value>
|
||||
</data>
|
||||
<data name="ScrollMode" xml:space="preserve">
|
||||
<value>Scroll mode</value>
|
||||
</data>
|
||||
<data name="Find" xml:space="preserve">
|
||||
<value>Find</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -216,4 +216,16 @@
|
||||
<data name="NextPage" xml:space="preserve">
|
||||
<value>Next page</value>
|
||||
</data>
|
||||
<data name="PageMode" xml:space="preserve">
|
||||
<value>Page mode</value>
|
||||
</data>
|
||||
<data name="TwoPageMode" xml:space="preserve">
|
||||
<value>Two page mode</value>
|
||||
</data>
|
||||
<data name="ScrollMode" xml:space="preserve">
|
||||
<value>Scroll mode</value>
|
||||
</data>
|
||||
<data name="Find" xml:space="preserve">
|
||||
<value>Find</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -216,4 +216,16 @@
|
||||
<data name="NextPage" xml:space="preserve">
|
||||
<value>Next page</value>
|
||||
</data>
|
||||
<data name="PageMode" xml:space="preserve">
|
||||
<value>Page mode</value>
|
||||
</data>
|
||||
<data name="TwoPageMode" xml:space="preserve">
|
||||
<value>Two page mode</value>
|
||||
</data>
|
||||
<data name="ScrollMode" xml:space="preserve">
|
||||
<value>Scroll mode</value>
|
||||
</data>
|
||||
<data name="Find" xml:space="preserve">
|
||||
<value>Find</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -216,4 +216,16 @@
|
||||
<data name="ZoomOut" xml:space="preserve">
|
||||
<value>Zoom out</value>
|
||||
</data>
|
||||
<data name="PageMode" xml:space="preserve">
|
||||
<value>Page mode</value>
|
||||
</data>
|
||||
<data name="TwoPageMode" xml:space="preserve">
|
||||
<value>Two page mode</value>
|
||||
</data>
|
||||
<data name="ScrollMode" xml:space="preserve">
|
||||
<value>Scroll mode</value>
|
||||
</data>
|
||||
<data name="Find" xml:space="preserve">
|
||||
<value>Find</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -216,4 +216,16 @@
|
||||
<data name="PreviousPage" xml:space="preserve">
|
||||
<value>上一页</value>
|
||||
</data>
|
||||
<data name="PageMode" xml:space="preserve">
|
||||
<value>页面模式</value>
|
||||
</data>
|
||||
<data name="TwoPageMode" xml:space="preserve">
|
||||
<value>双页模式</value>
|
||||
</data>
|
||||
<data name="ScrollMode" xml:space="preserve">
|
||||
<value>滚动模式</value>
|
||||
</data>
|
||||
<data name="Find" xml:space="preserve">
|
||||
<value>查找</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -23,6 +23,9 @@
|
||||
<Geometry o:Freeze="True" x:Key="UpDownGeometry">M454.464 143.68l-253.44 253.44c-12.032 12.032-12.032 31.36 0 43.392 11.968 11.968 31.36 11.968 43.328 0l237.376-237.376 237.376 237.376c11.968 11.968 31.36 11.968 43.328 0 12.032-12.032 12.032-31.36 0-43.392l-253.44-253.44C491.264 126.016 478.016 124.032 454.464 143.68zM507.968 947.648l252.48-253.376c11.968-11.968 11.968-31.36 0-43.392-11.968-11.968-31.296-11.968-43.264 0l-236.48 237.376L244.16 650.88c-11.968-11.968-31.296-11.968-43.264 0-11.968 12.032-11.968 31.424 0 43.392l252.48 253.376C465.984 960 491.136 964.48 507.968 947.648z</Geometry>
|
||||
<Geometry o:Freeze="True" x:Key="WindowMinGeometry">M0,4 L10,4 L10,5 L0,5 z</Geometry>
|
||||
<Geometry o:Freeze="True" x:Key="CheckedGeometry">M 0,2 3,5 8,0</Geometry>
|
||||
<Geometry o:Freeze="True" x:Key="PageModeGeometry">M1.0000002,12 L1.0000002,13 11,13 11,12 z M1.0000002,10 L1.0000002,11 11,11 11,10 z M1.0000002,8 L1.0000002,9 11,9 11,8 z M1.0000002,6 L1.0000002,7 11,7 11,6 z M1.0000002,4 L1.0000002,5 11,5 11,4 z M1.0000002,2 L1.0000002,3 11,3 11,2 z M0,0 L12,0 12,14 0,14 z</Geometry>
|
||||
<Geometry o:Freeze="True" x:Key="TwoPageModeGeometry">M8.99999988079071,12L8.99999988079071,13 13,13 13,12z M1,12L1,13 5,13 5,12z M9.00000011920929,10L9.00000011920929,11 13,11 13,10z M1,10L1,11 5,11 5,10z M9.00000011920929,8L9.00000011920929,9 13,9 13,8z M1,8L1,9 5,9 5,8z M9.00000011920929,6L9.00000011920929,7 13,7 13,6z M1,6L1,7 5,7 5,6z M9.00000011920929,4L9.00000011920929,5 13,5 13,4z M1,4L1,5 5,5 5,4z M8.99999988079071,2L8.99999988079071,3 13,3 13,2z M1,2L1,3 5,3 5,2z M7.99999994039536,0L14,0 14,14 7.99999994039536,14z M0,0L6,0 6,14 0,14z</Geometry>
|
||||
<Geometry o:Freeze="True" x:Key="ScrollModeGeometry">M1,12L1,13 8,13 8,12z M1,10L1,11 8,11 8,10z M1,8L1,9 8,9 8,8z M1,6L1,7 8,7 8,6z M11.0000002384186,5L11.0000002384186,9 13,9 13,5z M1,4L1,5 8,5 8,4z M1,2L1,3 8,3 8,2z M10.0000000298023,0L14,0 14,14 10.0000000298023,14z M0,0L9.00000011920929,0 9.00000011920929,14 0,14z</Geometry>
|
||||
<Geometry o:Freeze="True" x:Key="EyeOpenGeometry">M928 406.4c-100.8-137.6-249.6-224-416-224s-315.2 86.4-416 224c-44.8 60.8-44.8 150.4 0 211.2 102.4 137.6 251.2 224 416 224 166.4 0 315.2-86.4 416-224 46.4-60.8 46.4-150.4 0-211.2zM512 721.6c-115.2 0-209.6-94.4-209.6-209.6 0-115.2 94.4-209.6 209.6-209.6 115.2 0 209.6 94.4 209.6 209.6 1.6 115.2-92.8 209.6-209.6 209.6z m0-360c-83.2 0-150.4 67.2-150.4 150.4s67.2 150.4 150.4 150.4 150.4-67.2 150.4-150.4-67.2-150.4-150.4-150.4z m0 0</Geometry>
|
||||
<Geometry o:Freeze="True" x:Key="EyeCloseGeometry">M950.4 361.6c8-20.8 0-43.2-19.2-54.4-9.6-4.8-20.8-6.4-32-3.2s-19.2 11.2-24 22.4c-56 132.8-208 228.8-361.6 228.8-155.2 0-307.2-97.6-363.2-232-4.8-11.2-12.8-19.2-24-24-9.6-4.8-20.8-3.2-32 0-20.8 9.6-30.4 35.2-20.8 56 25.6 60.8 67.2 118.4 123.2 164.8l-67.2 70.4c-14.4 16-14.4 40 0 57.6 8 8 17.6 14.4 28.8 14.4s22.4-3.2 30.4-11.2l76.8-81.6c35.2 20.8 73.6 38.4 113.6 49.6l-28.8 83.2c-8 22.4 3.2 46.4 24 54.4 4.8 1.6 9.6 3.2 14.4 3.2 6.4 0 11.2-1.6 17.6-3.2 9.6-4.8 17.6-12.8 22.4-24l33.6-96c41.6 4.8 81.6 3.2 123.2-3.2l32 94.4c3.2 11.2 11.2 19.2 22.4 24 9.6 4.8 20.8 4.8 32 1.6 20.8-8 32-32 24-54.4l-28.8-84.8c30.4-9.6 59.2-22.4 86.4-38.4l62.4 65.6c14.4 16 43.2 16 57.6 0 16-16 16-43.2 0-60.8l-51.2-54.4c56-43.2 100.8-100.8 128-164.8z</Geometry>
|
||||
<Geometry o:Freeze="True" x:Key="WindowRestoreGeometry">M1,3 L1,9 L7,9 L7,3 z M3,1 L3,2 L8,2 L8,7 L9,7 L9,1 z M2,0 L10,0 L10,8 L8,8 L8,10 L0,10 L0,2 L2,2 z</Geometry>
|
||||
|
||||
@@ -61,12 +61,22 @@
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border x:Name="BorderRoot" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
|
||||
<ContentPresenter x:Name="contentPresenter" TextElement.Foreground="{TemplateBinding Foreground}" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
|
||||
<Path x:Name="PathMain" Width="{TemplateBinding controls:IconElement.Width}" Height="{TemplateBinding controls:IconElement.Height}" Fill="{TemplateBinding Foreground}" SnapsToDevicePixels="True" Stretch="Uniform" Data="{TemplateBinding controls:IconElement.Geometry}"/>
|
||||
<ContentPresenter x:Name="contentPresenter" RecognizesAccessKey="True" VerticalAlignment="Center" Margin="6,0,0,0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="TextElement.Foreground" Value="{DynamicResource PrimaryBrush}" TargetName="contentPresenter"/>
|
||||
</Trigger>
|
||||
<Trigger Property="Content" Value="{x:Null}">
|
||||
<Setter Property="Visibility" Value="Collapsed" TargetName="contentPresenter"/>
|
||||
</Trigger>
|
||||
<Trigger Property="controls:IconElement.Geometry" Value="{x:Null}">
|
||||
<Setter Property="Visibility" Value="Collapsed" TargetName="PathMain"/>
|
||||
<Setter Property="Margin" Value="0" TargetName="contentPresenter"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="FlowDocumentScrollViewer">
|
||||
<DockPanel Background="{TemplateBinding Background}" LastChildFill="True">
|
||||
<Grid x:Name="PART_ToolBarHost" Panel.ZIndex="1" DockPanel.Dock="Bottom" Margin="0,4">
|
||||
<Grid x:Name="PART_ToolBarHost" Panel.ZIndex="1" DockPanel.Dock="Bottom" Margin="0,6">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
@@ -60,7 +60,7 @@
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="FlowDocumentPageViewer">
|
||||
<DockPanel Background="{TemplateBinding Background}" LastChildFill="True">
|
||||
<Grid Panel.ZIndex="1" DockPanel.Dock="Bottom" HorizontalAlignment="Stretch" Margin="0,4">
|
||||
<Grid Panel.ZIndex="1" DockPanel.Dock="Bottom" HorizontalAlignment="Stretch" Margin="0,6">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
@@ -84,7 +84,7 @@
|
||||
</TextBlock>
|
||||
<RepeatButton Height="20" Width="20" Padding="4" controls:BorderElement.CornerRadius="10" controls:IconElement.Geometry="{StaticResource RightGeometry}" Command="NavigationCommands.NextPage" IsEnabled="{TemplateBinding CanGoToNextPage}" ToolTip="{x:Static langs:Lang.NextPage}"/>
|
||||
</StackPanel>
|
||||
<Grid Grid.Column="2" VerticalAlignment="Center" Margin="10,0,0,0">
|
||||
<Grid Grid.Column="2" VerticalAlignment="Center" Margin="32,0,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition/>
|
||||
@@ -105,5 +105,88 @@
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="FlowDocumentReaderBaseStyle" TargetType="FlowDocumentReader">
|
||||
<Setter Property="controls:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}"/>
|
||||
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Stretch"/>
|
||||
<Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type FlowDocumentReader}">
|
||||
<DockPanel Background="{TemplateBinding Background}" LastChildFill="True">
|
||||
<Grid Panel.ZIndex="1" DockPanel.Dock="Bottom" HorizontalAlignment="Stretch" Margin="0,6">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<ToggleButton Width="24" Height="24" Padding="5" x:Name="FindButton" controls:IconElement.Geometry="{StaticResource SearchGeometry}" Command="ApplicationCommands.Find" Margin="0,0,10,0" ToolTip="{x:Static langs:Lang.Find}"/>
|
||||
<Border x:Name="PART_FindToolBarHost" HorizontalAlignment="Left" Visibility="Collapsed" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
<StackPanel x:Name="PageCountAndButtons" Grid.Column="1" HorizontalAlignment="Center" Orientation="Horizontal" VerticalAlignment="Center">
|
||||
<RepeatButton Height="20" Width="20" Padding="4" controls:BorderElement.CornerRadius="10" controls:IconElement.Geometry="{StaticResource LeftGeometry}" Command="NavigationCommands.PreviousPage" IsEnabled="{TemplateBinding CanGoToPreviousPage}" ToolTip="{x:Static langs:Lang.PreviousPage}"/>
|
||||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<Run Text=" "/>
|
||||
<InlineUIContainer>
|
||||
<TextBlock Text="{Binding PageNumber, RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||
</InlineUIContainer>
|
||||
<Run Text=" "/>
|
||||
<Run Text="/"/>
|
||||
<Run Text=" "/>
|
||||
<InlineUIContainer>
|
||||
<TextBlock Text="{Binding PageCount, RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||
</InlineUIContainer>
|
||||
<Run Text=" "/>
|
||||
</TextBlock>
|
||||
<RepeatButton Height="20" Width="20" Padding="4" controls:BorderElement.CornerRadius="10" controls:IconElement.Geometry="{StaticResource RightGeometry}" Command="NavigationCommands.NextPage" IsEnabled="{TemplateBinding CanGoToNextPage}" ToolTip="{x:Static langs:Lang.NextPage}"/>
|
||||
</StackPanel>
|
||||
<Grid Grid.Column="2" Margin="32,0,0,0" VerticalAlignment="Center">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<controls:ButtonGroup Width="90">
|
||||
<RadioButton x:Name="PageViewButton" Padding="0" controls:IconElement.Geometry="{StaticResource PageModeGeometry}" CommandParameter="Page" Command="FlowDocumentReader.SwitchViewingModeCommand" GroupName="ViewingMode" IsEnabled="{TemplateBinding IsPageViewEnabled}" ToolTip="{x:Static langs:Lang.PageMode}"/>
|
||||
<RadioButton x:Name="TwoPageViewButton" controls:IconElement.Geometry="{StaticResource TwoPageModeGeometry}" Padding="0" CommandParameter="TwoPage" Command="FlowDocumentReader.SwitchViewingModeCommand" GroupName="ViewingMode" IsEnabled="{TemplateBinding IsTwoPageViewEnabled}" ToolTip="{x:Static langs:Lang.TwoPageMode}"/>
|
||||
<RadioButton x:Name="ScrollViewButton" controls:IconElement.Geometry="{StaticResource ScrollModeGeometry}" Padding="0" CommandParameter="Scroll" Command="FlowDocumentReader.SwitchViewingModeCommand" GroupName="ViewingMode" IsEnabled="{TemplateBinding IsScrollViewEnabled}" ToolTip="{x:Static langs:Lang.ScrollMode}"/>
|
||||
</controls:ButtonGroup>
|
||||
<RepeatButton Margin="32,0,0,0" Height="20" Width="20" Padding="5,8" controls:BorderElement.CornerRadius="10" controls:IconElement.Geometry="{StaticResource SubGeometry}" Grid.Column="1" Command="NavigationCommands.DecreaseZoom" IsEnabled="{TemplateBinding CanDecreaseZoom}" ToolTip="{x:Static langs:Lang.ZoomOut}"/>
|
||||
<Slider controls:TipElement.Visibility="Visible" controls:TipElement.Placement="Top" Grid.Column="2" HorizontalAlignment="Stretch" LargeChange="{TemplateBinding ZoomIncrement}" Maximum="{TemplateBinding MaxZoom}" Minimum="{TemplateBinding MinZoom}" SmallChange="{TemplateBinding ZoomIncrement}" TickFrequency="{TemplateBinding ZoomIncrement}" Value="{Binding Zoom, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="Center"/>
|
||||
<RepeatButton Height="20" Width="20" Padding="4" controls:BorderElement.CornerRadius="10" controls:IconElement.Geometry="{StaticResource AddGeometry}" Grid.Column="3" Command="NavigationCommands.IncreaseZoom" IsEnabled="{TemplateBinding CanIncreaseZoom}" ToolTip="{x:Static langs:Lang.ZoomIn}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Border Panel.ZIndex="0" x:Name="PART_ContentHost" KeyboardNavigation.IsTabStop="False" KeyboardNavigation.TabIndex="1" KeyboardNavigation.TabNavigation="Local" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Margin="{TemplateBinding Padding}" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||
</DockPanel>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="ViewingMode" Value="Page">
|
||||
<Setter Property="IsChecked" TargetName="PageViewButton" Value="True"/>
|
||||
</Trigger>
|
||||
<Trigger Property="ViewingMode" Value="TwoPage">
|
||||
<Setter Property="IsChecked" TargetName="TwoPageViewButton" Value="True"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
</Trigger>
|
||||
<Trigger Property="ViewingMode" Value="Scroll">
|
||||
<Setter Property="IsChecked" TargetName="ScrollViewButton" Value="True"/>
|
||||
<Setter Property="Visibility" TargetName="PageCountAndButtons" Value="Collapsed"/>
|
||||
</Trigger>
|
||||
<Trigger Property="Document" Value="{x:Null}">
|
||||
<Setter Property="IsEnabled" TargetName="FindButton" Value="False"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsFindEnabled" Value="False">
|
||||
<Setter Property="IsEnabled" TargetName="FindButton" Value="False"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -174,7 +174,10 @@
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="RadioButton">
|
||||
<Border x:Name="BorderRoot" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
|
||||
<ContentPresenter x:Name="contentPresenter" TextElement.Foreground="{TemplateBinding Foreground}" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
|
||||
<Path x:Name="PathMain" Width="{TemplateBinding controls:IconElement.Width}" Height="{TemplateBinding controls:IconElement.Height}" Fill="{TemplateBinding Foreground}" SnapsToDevicePixels="True" Stretch="Uniform" Data="{TemplateBinding controls:IconElement.Geometry}"/>
|
||||
<ContentPresenter x:Name="contentPresenter" RecognizesAccessKey="True" VerticalAlignment="Center" Margin="6,0,0,0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
@@ -185,6 +188,13 @@
|
||||
<Setter Property="Background" Value="{Binding Path=(controls:TitleElement.Background),RelativeSource={RelativeSource TemplatedParent}}" TargetName="BorderRoot"/>
|
||||
<Setter Property="TextElement.Foreground" Value="{Binding Path=(controls:TitleElement.Foreground),RelativeSource={RelativeSource TemplatedParent}}" TargetName="contentPresenter"/>
|
||||
</Trigger>
|
||||
<Trigger Property="Content" Value="{x:Null}">
|
||||
<Setter Property="Visibility" Value="Collapsed" TargetName="contentPresenter"/>
|
||||
</Trigger>
|
||||
<Trigger Property="controls:IconElement.Geometry" Value="{x:Null}">
|
||||
<Setter Property="Visibility" Value="Collapsed" TargetName="PathMain"/>
|
||||
<Setter Property="Margin" Value="0" TargetName="contentPresenter"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
<Style x:Key="ToggleButtonBaseStyle" BasedOn="{StaticResource ButtonBaseBaseStyle}" TargetType="ToggleButton">
|
||||
<Setter Property="controls:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource DarkMaskBrush}"/>
|
||||
<!--<Setter Property="BorderBrush" Value="{DynamicResource DarkMaskBrush}"/>-->
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ToggleButton">
|
||||
@@ -23,7 +23,7 @@
|
||||
<ContentPresenter x:Name="ContentPresenterMain" RecognizesAccessKey="True" VerticalAlignment="Center" Margin="6,0,0,0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border Visibility="Collapsed" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="BorderChecked" BorderThickness="4" BorderBrush="{TemplateBinding BorderBrush}"/>
|
||||
<Border Margin="-1" Visibility="Collapsed" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="BorderChecked" BorderThickness="4" BorderBrush="{DynamicResource DarkMaskBrush}"/>
|
||||
</controls:SimplePanel>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsChecked" Value="true">
|
||||
@@ -237,7 +237,10 @@
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ToggleButton">
|
||||
<Border x:Name="BorderRoot" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
|
||||
<ContentPresenter x:Name="contentPresenter" TextElement.Foreground="{TemplateBinding Foreground}" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
|
||||
<Path x:Name="PathMain" Width="{TemplateBinding controls:IconElement.Width}" Height="{TemplateBinding controls:IconElement.Height}" Fill="{TemplateBinding Foreground}" SnapsToDevicePixels="True" Stretch="Uniform" Data="{TemplateBinding controls:IconElement.Geometry}"/>
|
||||
<ContentPresenter x:Name="contentPresenter" RecognizesAccessKey="True" VerticalAlignment="Center" Margin="6,0,0,0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
@@ -248,6 +251,13 @@
|
||||
<Setter Property="Background" Value="{Binding Path=(controls:TitleElement.Background),RelativeSource={RelativeSource TemplatedParent}}" TargetName="BorderRoot"/>
|
||||
<Setter Property="TextElement.Foreground" Value="{Binding Path=(controls:TitleElement.Foreground),RelativeSource={RelativeSource TemplatedParent}}" TargetName="contentPresenter"/>
|
||||
</Trigger>
|
||||
<Trigger Property="Content" Value="{x:Null}">
|
||||
<Setter Property="Visibility" Value="Collapsed" TargetName="contentPresenter"/>
|
||||
</Trigger>
|
||||
<Trigger Property="controls:IconElement.Geometry" Value="{x:Null}">
|
||||
<Setter Property="Visibility" Value="Collapsed" TargetName="PathMain"/>
|
||||
<Setter Property="Margin" Value="0" TargetName="contentPresenter"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
|
||||
@@ -7,5 +7,7 @@
|
||||
<Style BasedOn="{StaticResource FlowDocumentScrollViewerBaseStyle}" TargetType="FlowDocumentScrollViewer"/>
|
||||
|
||||
<Style BasedOn="{StaticResource FlowDocumentPageViewerBaseStyle}" TargetType="FlowDocumentPageViewer"/>
|
||||
|
||||
<Style BasedOn="{StaticResource FlowDocumentReaderBaseStyle}" TargetType="FlowDocumentReader"/>
|
||||
|
||||
</ResourceDictionary>
|
||||
Reference in new issue
Block a user