资源字典的意义在于:
1.高效,可以通过资源定义对象,并在标记的多个地方使用,这会精简代码
2.可维护性,通过资源使用低级的格式化细节,如字号,并将它们移到便于修改的中央位置。在XAML中创建资源相当于在代码中创建常亮
3.适应性,一旦某些特定信息与应用程序的其他部分分离开来,并放在资源中,那么可以动态的修改这些信息,如修改皮肤或者语言
————————————————
版权声明:本文为CSDN博主「Bird鸟人」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/wcc27857285/article/details/90943244
<ResourceDictionary x:Class="TYHTGLPT.Theme.Style"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:convert="clr-namespace:TYHTGLPT"
xmlns:kj="clr-namespace:TYHTGLPT.控件"
xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing"
xmlns:bc="clr-namespace:BKControl.BasisControl;assembly=BKControl"
xmlns:ac="clr-namespace:BKControl.AdvancedControl;assembly=BKControl"
xmlns:xce="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:bk="clr-namespace:BKControl;assembly=BKControl">
<convert:RowsConverter x:Key="rsc"/>
<!--错误文本颜色-->
<SolidColorBrush x:Key="Error.Foreground" Color="#e04343"/>
<!--统一颜色-->
<SolidColorBrush x:Key="Window.Title.Color" Color="#20A0FF"/>
<SolidColorBrush x:Key="Window.Border.Color" Color="#9b9b9b"/>
<SolidColorBrush x:Key="Window.Foreground.Color" Color="White"/>
<SolidColorBrush x:Key="Window.Border.Background" Color="#E4EBF3"/>
<SolidColorBrush x:Key="DataList.Footer.Color" Color="#dedee4"/>
<SolidColorBrush x:Key="Button.Window.OK.Color" Color="#53BA00"/>
<SolidColorBrush x:Key="Button.Dialog.OK.Color" Color="#2DCC70"/>
<SolidColorBrush x:Key="Button.Login.Color" Color="#2DCC70"/>
<SolidColorBrush x:Key="TextBox.Static.Border" Color="#009AFF"/>
<SolidColorBrush x:Key="TextBlock.Title.Color" Color="#333333"/>
<SolidColorBrush x:Key="TextBlock.Content.Color" Color="#666666"/>
<SolidColorBrush x:Key="TextBlock.ToolTip.Color" Color="#999999"/>
<SolidColorBrush x:Key="TextBox.Disabled.Border" Color="#D3DCE6"/>
<SolidColorBrush x:Key="Expander.Static.Foreground" Color="#424D5F"/>
<LinearGradientBrush x:Key="LoginButtonColor" EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#9ae44e" Offset="0"/>
<GradientStop Color="#76cc1e" Offset="1"/>
</LinearGradientBrush>
<LinearGradientBrush x:Key="SendCodeButtonColor" EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#f5f6f7" Offset="0"/>
<GradientStop Color="#e2e5e7" Offset="1"/>
</LinearGradientBrush>
<LinearGradientBrush x:Key="SelelctButtonColor" EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#fffae5" Offset="0"/>
<GradientStop Color="#ffe891" Offset="1"/>
</LinearGradientBrush>
<Style x:Key="DateTimePickerStyle1" TargetType="{x:Type xce:DateTimePicker}">
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
<Setter Property="BorderBrush" Value="{StaticResource TextBox.Disabled.Border}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="IsTabStop" Value="False"/>
<Setter Property="HorizontalContentAlignment" Value="Right"/>
<Setter Property="TextAlignment" Value="Right"/>
<Setter Property="TimeWatermarkTemplate">
<Setter.Value>
<DataTemplate>
<ContentControl Content="{Binding}" Foreground="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" Focusable="False" Margin="0,0,3,0"/>
</DataTemplate>
</Setter.Value>
</Setter>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="WatermarkTemplate">
<Setter.Value>
<DataTemplate>
<ContentControl Content="{Binding}" Foreground="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" Focusable="False" Margin="0,0,3,0"/>
</DataTemplate>
</Setter.Value>
</Setter>
<Setter Property="CalendarWidth" Value="178"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type xce:DateTimePicker}">
<Border Name="bor" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
<Grid>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<xce:WatermarkTextBox x:Name="PART_TextBox" AcceptsReturn="False" BorderThickness="0" Background="Transparent" Foreground="{TemplateBinding Foreground}" FontWeight="{TemplateBinding FontWeight}" FontStyle="{TemplateBinding FontStyle}" FontStretch="{TemplateBinding FontStretch}" FontSize="{TemplateBinding FontSize}" FontFamily="{TemplateBinding FontFamily}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" IsTabStop="True" IsUndoEnabled="True" MinWidth="20" Padding="{TemplateBinding Padding}" TextAlignment="{TemplateBinding TextAlignment}" TextWrapping="NoWrap" Text="{Binding Text, RelativeSource={RelativeSource TemplatedParent}}" TabIndex="{TemplateBinding TabIndex}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" WatermarkTemplate="{TemplateBinding WatermarkTemplate}" Watermark="{TemplateBinding Watermark}"/>
<ToggleButton x:Name="_calendarToggleButton" Grid.Column="1" Focusable="False" IsChecked="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="Center" HorizontalAlignment="Center">
<ToggleButton.IsHitTestVisible>
<Binding Path="IsOpen" RelativeSource="{RelativeSource TemplatedParent}">
<Binding.Converter>
<xce:InverseBoolConverter/>
</Binding.Converter>
</Binding>
</ToggleButton.IsHitTestVisible>
<ToggleButton.IsEnabled>
<Binding Path="IsReadOnly" RelativeSource="{RelativeSource TemplatedParent}">
<Binding.Converter>
<xce:InverseBoolConverter/>
</Binding.Converter>
</Binding>
</ToggleButton.IsEnabled>
<ToggleButton.Style>
<Style TargetType="{x:Type ToggleButton}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Grid Background="#11FFFFFF" FlowDirection="LeftToRight" HorizontalAlignment="Center" Height="18" Margin="0,0,5,0" VerticalAlignment="Center" Width="19">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="20*"/>
<ColumnDefinition Width="20*"/>
<ColumnDefinition Width="20*"/>
<ColumnDefinition Width="20*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="23*"/>
<RowDefinition Height="19*"/>
<RowDefinition Height="19*"/>
<RowDefinition Height="19*"/>
</Grid.RowDefinitions>
<Border x:Name="Highlight" BorderBrush="#FF45D6FA" BorderThickness="1" Grid.ColumnSpan="4" CornerRadius="0,0,1,1" Margin="-1" Opacity="0" Grid.Row="0" Grid.RowSpan="4"/>
<Border x:Name="Background" BorderBrush="#FFFFFFFF" BorderThickness="1" Background="#FF1F3B53" Grid.ColumnSpan="4" CornerRadius=".5" Margin="0,-1,0,0" Opacity="1" Grid.Row="1" Grid.RowSpan="3"/>
<Border x:Name="BackgroundGradient" BorderBrush="#BF000000" BorderThickness="1" Grid.ColumnSpan="4" CornerRadius=".5" Margin="0,-1,0,0" Opacity="1" Grid.Row="1" Grid.RowSpan="3">
<Border.Background>
<LinearGradientBrush EndPoint=".7,1" StartPoint=".7,0">
<GradientStop Color="#FFFFFFFF" Offset="0"/>
<GradientStop Color="#F9FFFFFF" Offset="0.375"/>
<GradientStop Color="#E5FFFFFF" Offset="0.625"/>
<GradientStop Color="#C6FFFFFF" Offset="1"/>
</LinearGradientBrush>
</Border.Background>
</Border>
<Rectangle Grid.ColumnSpan="4" Grid.RowSpan="1" StrokeThickness="1">
<Rectangle.Fill>
<LinearGradientBrush EndPoint="0.3,-1.1" StartPoint="0.46,1.6">
<GradientStop Color="#FF4084BD"/>
<GradientStop Color="#FFAFCFEA" Offset="1"/>
</LinearGradientBrush>
</Rectangle.Fill>
<Rectangle.Stroke>
<LinearGradientBrush EndPoint="0.48,-1" StartPoint="0.48,1.25">
<GradientStop Color="#FF494949"/>
<GradientStop Color="#FF9F9F9F" Offset="1"/>
</LinearGradientBrush>
</Rectangle.Stroke>
</Rectangle>
<Path Grid.ColumnSpan="4" Grid.Column="0" Data="M11.426758,8.4305077 L11.749023,8.4305077 L11.749023,16.331387 L10.674805,16.331387 L10.674805,10.299648 L9.0742188,11.298672 L9.0742188,10.294277 C9.4788408,10.090176 9.9094238,9.8090878 10.365967,9.4510155 C10.82251,9.0929432 11.176106,8.7527733 11.426758,8.4305077 z M14.65086,8.4305077 L18.566387,8.4305077 L18.566387,9.3435936 L15.671368,9.3435936 L15.671368,11.255703 C15.936341,11.058764 16.27293,10.960293 16.681133,10.960293 C17.411602,10.960293 17.969301,11.178717 18.354229,11.615566 C18.739157,12.052416 18.931622,12.673672 18.931622,13.479336 C18.931622,15.452317 18.052553,16.438808 16.294415,16.438808 C15.560365,16.438808 14.951641,16.234707 14.468243,15.826504 L14.881817,14.929531 C15.368796,15.326992 15.837872,15.525723 16.289043,15.525723 C17.298809,15.525723 17.803692,14.895514 17.803692,13.635098 C17.803692,12.460618 17.305971,11.873379 16.310528,11.873379 C15.83071,11.873379 15.399232,12.079271 15.016094,12.491055 L14.65086,12.238613 z" Fill="#FF2F2F2F" HorizontalAlignment="Center" Margin="4,3,4,3" Grid.Row="1" Grid.RowSpan="3" RenderTransformOrigin="0.5,0.5" Stretch="Fill" VerticalAlignment="Center"/>
<Ellipse Grid.ColumnSpan="4" Fill="#FFFFFFFF" HorizontalAlignment="Center" Height="3" StrokeThickness="0" VerticalAlignment="Center" Width="3"/>
<Border x:Name="DisabledVisual" BorderBrush="#B2FFFFFF" BorderThickness="1" Grid.ColumnSpan="4" CornerRadius="0,0,.5,.5" Opacity="0" Grid.Row="0" Grid.RowSpan="4"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ToggleButton.Style>
</ToggleButton>
<bc:ErrorPopup x:Name="errorpopup" Focusable="False" AllowsTransparency="True" Placement="Bottom" IsOpen="False" VerticalOffset="3" IsHitTestVisible="False">
<ed:Callout AnchorPoint="0.265,-0.35" Margin="0,25,0,0" Fill="#ffe2e5" Stroke="{StaticResource Error.Foreground}">
<ed:Callout.Content>
<TextBlock Margin="5" FontSize="12" Foreground="{StaticResource Error.Foreground}" Text="{TemplateBinding bc:ControlAttachProperty.ErrorText}"/>
</ed:Callout.Content>
</ed:Callout>
</bc:ErrorPopup>
</Grid>
<Popup x:Name="PART_Popup" IsOpen="{Binding IsChecked, ElementName=_calendarToggleButton}" StaysOpen="False" ToolTip="">
<Popup.Resources>
<Style x:Key="{x:Type ToolTip}" TargetType="{x:Type ToolTip}">
<Style.Triggers>
<Trigger Property="Content" Value="">
<Setter Property="Visibility" Value="Collapsed"/>
</Trigger>
</Style.Triggers>
</Style>
</Popup.Resources>
<Border BorderBrush="#FFABADB3" BorderThickness="1" Padding="3">
<Border.Background>
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
<GradientStop Color="#FFF0F0F0" Offset="0"/>
<GradientStop Color="#FFE5E5E5" Offset="1"/>
</LinearGradientBrush>
</Border.Background>
<StackPanel>
<Calendar x:Name="PART_Calendar" BorderThickness="0" DisplayMode="{Binding CalendarDisplayMode, RelativeSource={RelativeSource TemplatedParent}}" DisplayDate="2018-07-24">
<Calendar.Template>
<ControlTemplate TargetType="{x:Type Calendar}">
<Viewbox Width="{Binding CalendarWidth, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type xce:DateTimePicker}}}">
<StackPanel x:Name="PART_Root" HorizontalAlignment="Center">
<CalendarItem x:Name="PART_CalendarItem" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Style="{TemplateBinding CalendarItemStyle}"/>
</StackPanel>
</Viewbox>
</ControlTemplate>
</Calendar.Template>
</Calendar>
<xce:TimePicker x:Name="PART_TimeUpDown" AllowSpin="{TemplateBinding TimePickerAllowSpin}" Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" ClipValueToMinMax="{Binding ClipValueToMinMax, RelativeSource={RelativeSource TemplatedParent}}" Foreground="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}" FormatString="{TemplateBinding TimeFormatString}" Format="{TemplateBinding TimeFormat}" IsUndoEnabled="{Binding IsUndoEnabled, RelativeSource={RelativeSource TemplatedParent}}" Kind="{Binding Kind, RelativeSource={RelativeSource TemplatedParent}}" Maximum="{Binding Maximum, RelativeSource={RelativeSource TemplatedParent}}" Minimum="{Binding Minimum, RelativeSource={RelativeSource TemplatedParent}}" ShowButtonSpinner="{TemplateBinding TimePickerShowButtonSpinner}" Step="{TemplateBinding Step}" Text="" Visibility="{TemplateBinding TimePickerVisibility}" Value="{Binding Value, RelativeSource={RelativeSource TemplatedParent}}" WatermarkTemplate="{TemplateBinding TimeWatermarkTemplate}" Watermark="{TemplateBinding TimeWatermark}"/>
</StackPanel>
</Border>
</Popup>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="BorderBrush" Value="{StaticResource TextBox.Static.Border}"/>
</Trigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsReadOnly, RelativeSource={RelativeSource Self}}" Value="False"/>
<Condition Binding="{Binding AllowTextInput, RelativeSource={RelativeSource Self}}" Value="False"/>
</MultiDataTrigger.Conditions>
<Setter Property="IsReadOnly" TargetName="PART_TextBox" Value="True"/>
</MultiDataTrigger>
<DataTrigger Binding="{Binding IsReadOnly, RelativeSource={RelativeSource Self}}" Value="True">
<Setter Property="IsReadOnly" TargetName="PART_TextBox" Value="True"/>
</DataTrigger>
<Trigger Property="IsKeyboardFocusWithin" Value="True">
<Setter Property="BorderBrush" Value="{StaticResource TextBox.Static.Border}"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
</Trigger>
<Trigger Property="IsFocused" Value="True">
<Setter Property="FocusManager.FocusedElement" TargetName="bor" Value="{Binding ElementName=bor}"/>
</Trigger>
<Trigger Property="bc:ControlAttachProperty.IsError" Value="true">
<Setter TargetName="errorpopup" Property="IsOpen" Value="true"/>
<Setter TargetName="bor" Property="BorderBrush" Value="{StaticResource Error.Foreground}"/>
</Trigger>
<Trigger Property="bc:ControlAttachProperty.ErrorText" Value="">
<Setter TargetName="errorpopup" Property="IsOpen" Value="false"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--主工作区选项卡样式-->
<SolidColorBrush x:Key="TabControl.HeaderBackGround" Color="#f5f4f7"/>
<Style TargetType="{x:Type TabControl}" x:Key="MainTabPanel">
<Style.Resources>
<!--选项卡单项样式-->
<Style TargetType="{x:Type TabItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabItem}">
<Border x:Name="border" Margin="0,0,2,0" CornerRadius="5,5,0,0" SnapsToDevicePixels="True" ClipToBounds="True">
<ContentPresenter x:Name="contentPresenter" ContentSource="Header" Focusable="False" RecognizesAccessKey="True"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="border" Property="Background" Value="#4dd0e1"/>
</Trigger>
<Trigger Property="IsSelected" Value="False">
<Setter TargetName="border" Property="Background" Value="#ffffff"/>
</Trigger>
<!--<Trigger Property="TabStripPlacement" Value="Top"/>
<Trigger Property="TabStripPlacement" Value="Left">
<Setter Property="LayoutTransform">
<Setter.Value>
<RotateTransform Angle="-90" />
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="TabStripPlacement" Value="Right">
<Setter Property="LayoutTransform">
<Setter.Value>
<RotateTransform Angle="90" />
</Setter.Value>
</Setter>
</Trigger>-->
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Style.Resources>
<Setter Property="TabStripPlacement" Value="Top"/>
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabControl}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Name="ROW0" Height="Auto"/>
<RowDefinition Name="ROW1" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Name="COL0" />
<ColumnDefinition Name="COL1" />
</Grid.ColumnDefinitions>
<Border Background="{StaticResource TabControl.HeaderBackGround}" Name="Mask" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"/>
<Border Name="TP" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
<Grid>
<ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden" Height="52" Margin="12,0,90,0">
<StackPanel Orientation="Horizontal" IsItemsHost="True" VerticalAlignment="Bottom">
<StackPanel.OpacityMask>
<VisualBrush Visual="{Binding ElementName=Mask}"/>
</StackPanel.OpacityMask>
</StackPanel>
</ScrollViewer>
<Rectangle x:Name="rect" Fill="#e3e3e4" VerticalAlignment="Bottom" Height="2" Margin="12,0,10,0"/>
</Grid>
</Border>
<Grid Name="TC" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2">
<ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</Grid>
</Grid>
<ControlTemplate.Triggers>
<!--<Trigger Property="TabStripPlacement" Value="Top">
<Setter TargetName="ROW0" Property="Height" Value="auto" />
<Setter TargetName="Mask" Property="Grid.Row" Value="0" />
<Setter TargetName="Mask" Property="Grid.Column" Value="0" />
<Setter TargetName="Mask" Property="Grid.ColumnSpan" Value="2" />
<Setter TargetName="TP" Property="Grid.Row" Value="0" />
<Setter TargetName="TP" Property="Grid.Column" Value="0" />
<Setter TargetName="TP" Property="Grid.ColumnSpan" Value="2" />
<Setter TargetName="TC" Property="Grid.Column" Value="0" />
<Setter TargetName="TC" Property="Grid.Row" Value="1" />
<Setter TargetName="TC" Property="Grid.ColumnSpan" Value="2" />
</Trigger>-->
<!--<Trigger Property="TabStripPlacement" Value="Bottom">
<Setter TargetName="ROW1" Property="Height" Value="auto" />
<Setter TargetName="Mask" Property="Grid.Row" Value="1" />
<Setter TargetName="Mask" Property="Grid.Column" Value="0" />
<Setter TargetName="Mask" Property="Grid.ColumnSpan" Value="2" />
<Setter TargetName="TP" Property="Grid.Row" Value="1" />
<Setter TargetName="TP" Property="Grid.Column" Value="0" />
<Setter TargetName="TP" Property="Grid.ColumnSpan" Value="2" />
<Setter TargetName="TC" Property="Grid.Column" Value="0" />
<Setter TargetName="TC" Property="Grid.Row" Value="0" />
<Setter TargetName="TC" Property="Grid.ColumnSpan" Value="2" />
</Trigger>
<Trigger Property="TabStripPlacement" Value="Left">
<Setter TargetName="COL0" Property="Width" Value="auto" />
<Setter TargetName="Mask" Property="Grid.Row" Value="0" />
<Setter TargetName="Mask" Property="Grid.Column" Value="0" />
<Setter TargetName="Mask" Property="Grid.RowSpan" Value="2" />
<Setter TargetName="TP" Property="Grid.Row" Value="0" />
<Setter TargetName="TP" Property="Grid.Column" Value="0" />
<Setter TargetName="TP" Property="Grid.RowSpan" Value="2" />
<Setter TargetName="TC" Property="Grid.Column" Value="1" />
<Setter TargetName="TC" Property="Grid.Row" Value="0" />
<Setter TargetName="TC" Property="Grid.RowSpan" Value="2" />
</Trigger>
<Trigger Property="TabStripPlacement" Value="Right">
<Setter TargetName="COL1" Property="Width" Value="auto" />
<Setter TargetName="Mask" Property="Grid.Row" Value="0" />
<Setter TargetName="Mask" Property="Grid.Column" Value="1" />
<Setter TargetName="Mask" Property="Grid.RowSpan" Value="2" />
<Setter TargetName="TP" Property="Grid.Row" Value="0" />
<Setter TargetName="TP" Property="Grid.Column" Value="1" />
<Setter TargetName="TP" Property="Grid.RowSpan" Value="2" />
<Setter TargetName="TC" Property="Grid.Column" Value="0" />
<Setter TargetName="TC" Property="Grid.Row" Value="0" />
<Setter TargetName="TC" Property="Grid.RowSpan" Value="2" />
</Trigger>-->
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--列表行数模版-->
<DataTemplate x:Key="rowIndicatorContentTemplate">
<StackPanel VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
<TextBlock Text="{Binding Path=RowHandle.Value,Converter={StaticResource rsc}}"
TextAlignment="Center" Foreground="LightGray"/>
</StackPanel>
</DataTemplate>
<!--滚动条-->
<Style x:Key="ScrollViewerStyle" TargetType="{x:Type ScrollViewer}">
<Setter Property="OverridesDefaultStyle" Value="True"/>
<Setter Property="CanContentScroll" Value="True"/>
<Style.Resources>
<SolidColorBrush x:Key="DisabledForegroundBrush" Color="#D6D4D4" />
<SolidColorBrush x:Key="NormalBrush" Color="Transparent" />
<SolidColorBrush x:Key="NormalBorderBrush" Color="#D6D4D4" />
<SolidColorBrush x:Key="HorizontalNormalBrush" Color="#D6D4D4" />
<SolidColorBrush x:Key="HorizontalNormalBorderBrush" Color="#D6D4D4" />
<!--方向箭头颜色-->
<SolidColorBrush x:Key="GlyphBrush" Color="Black"/>
<LinearGradientBrush x:Key="PressedBrush"
StartPoint="0,0" EndPoint="0,1">
<GradientBrush.GradientStops>
<GradientStopCollection>
<GradientStop Color="#BBB" Offset="0.0"/>
<GradientStop Color="#EEE" Offset="0.1"/>
<GradientStop Color="#EEE" Offset="0.9"/>
<GradientStop Color="#FFF" Offset="1.0"/>
</GradientStopCollection>
</GradientBrush.GradientStops>
</LinearGradientBrush>
<!--方向箭头按钮-->
<Style x:Key="ScrollBarLineButton" TargetType="{x:Type RepeatButton}">
<Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="OverridesDefaultStyle" Value="true"/>
<Setter Property="Focusable" Value="false"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type RepeatButton}">