|
|
@@ -261,8 +261,8 @@ |
|
|
|
</Setter> |
|
|
|
</Style.Setters> |
|
|
|
</Style> |
|
|
|
|
|
|
|
<Style TargetType="{x:Type TextBox}"> |
|
|
|
|
|
|
|
<Style TargetType="{x:Type ctrl:TheTextBox}"> |
|
|
|
<Setter Property="BorderBrush" Value="{x:Static Themes1:ClassicBorderDecorator.ClassicBorderBrush}" /> |
|
|
|
<Setter Property="BorderThickness" Value="1" /> |
|
|
|
<Setter Property="Padding" Value="0" /> |
|
|
@@ -307,7 +307,53 @@ |
|
|
|
</MultiTrigger> |
|
|
|
</Style.Triggers> |
|
|
|
</Style> |
|
|
|
|
|
|
|
|
|
|
|
<Style TargetType="{x:Type ctrl:NumberBox}"> |
|
|
|
<Setter Property="BorderBrush" Value="{x:Static Themes1:ClassicBorderDecorator.ClassicBorderBrush}" /> |
|
|
|
<Setter Property="BorderThickness" Value="1" /> |
|
|
|
<Setter Property="Padding" Value="0" /> |
|
|
|
<Setter Property="Foreground" Value="{DynamicResource foreground}" /> |
|
|
|
<Setter Property="KeyboardNavigation.TabNavigation" Value="None" /> |
|
|
|
<Setter Property="VerticalContentAlignment" Value="Center" /> |
|
|
|
<Setter Property="Height" Value="24" /> |
|
|
|
<Setter Property="CaretBrush" Value="White" /> |
|
|
|
<Setter Property="Padding" Value="0" /> |
|
|
|
<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}"> |
|
|
|
<Themes1:ClassicBorderDecorator |
|
|
|
x:Name="Bd" |
|
|
|
BorderBrush="{DynamicResource borderBrush}" |
|
|
|
BorderStyle="None" |
|
|
|
BorderThickness="1"> |
|
|
|
<ScrollViewer x:Name="PART_ContentHost" /> |
|
|
|
</Themes1:ClassicBorderDecorator> |
|
|
|
<ControlTemplate.Triggers> |
|
|
|
<Trigger Property="IsEnabled" Value="false"> |
|
|
|
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" /> |
|
|
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" /> |
|
|
|
</Trigger> |
|
|
|
</ControlTemplate.Triggers> |
|
|
|
</ControlTemplate> |
|
|
|
</Setter.Value> |
|
|
|
</Setter> |
|
|
|
<Style.Triggers> |
|
|
|
<MultiTrigger> |
|
|
|
<MultiTrigger.Conditions> |
|
|
|
<Condition Property="IsInactiveSelectionHighlightEnabled" Value="true" /> |
|
|
|
<Condition Property="IsSelectionActive" Value="false" /> |
|
|
|
<Condition Property="IsSelectionActive" Value="false" /> |
|
|
|
</MultiTrigger.Conditions> |
|
|
|
<Setter Property="SelectionBrush" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}" /> |
|
|
|
</MultiTrigger> |
|
|
|
</Style.Triggers> |
|
|
|
</Style> |
|
|
|
|
|
|
|
<Style TargetType="{x:Type ctrl:TheTextBlock}"> |
|
|
|
<Style.Setters> |
|
|
|
<Setter Property="Foreground" Value="{DynamicResource foreground}" /> |
|
|
@@ -440,12 +486,6 @@ |
|
|
|
</Setter> |
|
|
|
</Style> |
|
|
|
|
|
|
|
<Style TargetType="{x:Type ctrl:NumberBox}" BasedOn="{StaticResource {x:Type TextBox}}"> |
|
|
|
<Setter Property="input:InputMethod.IsInputMethodEnabled" Value="False"/> |
|
|
|
</Style> |
|
|
|
<Style TargetType="{x:Type ctrl:TheTextBox}" BasedOn="{StaticResource {x:Type TextBox}}"> |
|
|
|
<Setter Property="input:InputMethod.IsInputMethodEnabled" Value="False"/> |
|
|
|
</Style> |
|
|
|
<Style TargetType="{x:Type ctrl:TheCheckBox}"> |
|
|
|
<Setter Property="Foreground" Value="{DynamicResource foreground}" /> |
|
|
|
<Setter Property="VerticalContentAlignment" Value="Center" /> |
|
|
@@ -545,7 +585,9 @@ |
|
|
|
</Setter.Value> |
|
|
|
</Setter> |
|
|
|
</Style> |
|
|
|
|
|
|
|
<Geometry x:Key="DownArrowGeometry">M 0 0 L 3.5 4 L 7 0 Z</Geometry> |
|
|
|
|
|
|
|
<Style x:Key="ComboBoxTransparentButtonStyle" TargetType="{x:Type ToggleButton}"> |
|
|
|
<Setter Property="MinWidth" Value="0" /> |
|
|
|
<Setter Property="MinHeight" Value="0" /> |
|
|
@@ -590,6 +632,7 @@ |
|
|
|
</Trigger> |
|
|
|
</Style.Triggers> |
|
|
|
</Style> |
|
|
|
|
|
|
|
<Style x:Key="ComboBoxEditableTextBox" TargetType="{x:Type TextBox}"> |
|
|
|
<Setter Property="OverridesDefaultStyle" Value="true" /> |
|
|
|
<Setter Property="AllowDrop" Value="true" /> |
|
|
@@ -612,6 +655,7 @@ |
|
|
|
</Setter.Value> |
|
|
|
</Setter> |
|
|
|
</Style> |
|
|
|
|
|
|
|
<ControlTemplate x:Key="ComboBoxEditableTemplate" TargetType="{x:Type ComboBox}"> |
|
|
|
<Border |
|
|
|
Background="{TemplateBinding Background}" |
|
|
@@ -715,152 +759,6 @@ |
|
|
|
</Trigger> |
|
|
|
</ControlTemplate.Triggers> |
|
|
|
</ControlTemplate> |
|
|
|
<Style x:Key="BaseComboBoxStyle" TargetType="{x:Type ComboBox}"> |
|
|
|
<Setter Property="FocusVisualStyle" Value="{StaticResource ComboBoxFocusVisual}" /> |
|
|
|
<Setter Property="Foreground" Value="{DynamicResource foreground}" /> |
|
|
|
<Setter Property="Background" Value="Transparent" /> |
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource borderBrush}" /> |
|
|
|
<Setter Property="BorderThickness" Value="1" /> |
|
|
|
<Setter Property="Margin" Value="0,0,0,0" /> |
|
|
|
<Setter Property="Padding" Value="0" /> |
|
|
|
<Setter Property="Height" Value="24" /> |
|
|
|
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" /> |
|
|
|
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" /> |
|
|
|
<Setter Property="ScrollViewer.CanContentScroll" Value="true" /> |
|
|
|
<Setter Property="ScrollViewer.PanningMode" Value="Both" /> |
|
|
|
<Setter Property="Stylus.IsFlicksEnabled" Value="False" /> |
|
|
|
<Setter Property="VerticalContentAlignment" Value="Center" /> |
|
|
|
<Setter Property="IsTextSearchCaseSensitive" Value="true" /> |
|
|
|
<Setter Property="IsEditable" Value="true" /> |
|
|
|
<Setter Property="StaysOpenOnEdit" Value="true" /> |
|
|
|
<Setter Property="Template"> |
|
|
|
<Setter.Value> |
|
|
|
<ControlTemplate TargetType="{x:Type ComboBox}"> |
|
|
|
|
|
|
|
<Border |
|
|
|
Background="{TemplateBinding Background}" |
|
|
|
BorderBrush="{TemplateBinding BorderBrush}" |
|
|
|
BorderThickness="{TemplateBinding BorderThickness}" |
|
|
|
SnapsToDevicePixels="true"> |
|
|
|
<Grid> |
|
|
|
<Themes1:ClassicBorderDecorator |
|
|
|
x:Name="Border" |
|
|
|
BorderBrush="{x:Static Themes1:ClassicBorderDecorator.ClassicBorderBrush}" |
|
|
|
BorderStyle="None" |
|
|
|
BorderThickness="2"> |
|
|
|
<Popup |
|
|
|
x:Name="PART_Popup" |
|
|
|
AllowsTransparency="true" |
|
|
|
Focusable="False" |
|
|
|
IsOpen="{TemplateBinding IsDropDownOpen}" |
|
|
|
Placement="Bottom" |
|
|
|
PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}"> |
|
|
|
<Themes1:SystemDropShadowChrome |
|
|
|
x:Name="Shdw" |
|
|
|
MinWidth="{Binding ActualWidth, ElementName=Border}" |
|
|
|
MaxHeight="{TemplateBinding MaxDropDownHeight}" |
|
|
|
Color="Transparent"> |
|
|
|
<Border |
|
|
|
x:Name="DropDownBorder" |
|
|
|
BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}" |
|
|
|
BorderThickness="1"> |
|
|
|
<Border.Background> |
|
|
|
<ImageBrush ImageSource="../Images/nbbj.png" /> |
|
|
|
</Border.Background> |
|
|
|
<ScrollViewer x:Name="DropDownScrollViewer"> |
|
|
|
<Grid RenderOptions.ClearTypeHint="Enabled"> |
|
|
|
<Canvas |
|
|
|
Width="0" |
|
|
|
Height="0" |
|
|
|
HorizontalAlignment="Left" |
|
|
|
VerticalAlignment="Top"> |
|
|
|
<Rectangle |
|
|
|
x:Name="OpaqueRect" |
|
|
|
Width="{Binding ActualWidth, ElementName=DropDownBorder}" |
|
|
|
Height="{Binding ActualHeight, ElementName=DropDownBorder}" |
|
|
|
Fill="{Binding Background, ElementName=DropDownBorder}" /> |
|
|
|
</Canvas> |
|
|
|
<ItemsPresenter |
|
|
|
x:Name="ItemsPresenter" |
|
|
|
KeyboardNavigation.DirectionalNavigation="Contained" |
|
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> |
|
|
|
</Grid> |
|
|
|
</ScrollViewer> |
|
|
|
</Border> |
|
|
|
</Themes1:SystemDropShadowChrome> |
|
|
|
</Popup> |
|
|
|
</Themes1:ClassicBorderDecorator> |
|
|
|
<DockPanel Margin="2"> |
|
|
|
<FrameworkElement Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" DockPanel.Dock="Right" /> |
|
|
|
<Border x:Name="SelectedItemBorder" Margin="{TemplateBinding Padding}"> |
|
|
|
<ContentPresenter |
|
|
|
Margin="1,1,1,1" |
|
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
|
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
|
|
|
Content="{TemplateBinding SelectionBoxItem}" |
|
|
|
ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}" |
|
|
|
ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" |
|
|
|
ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" |
|
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> |
|
|
|
</Border> |
|
|
|
</DockPanel> |
|
|
|
<ToggleButton |
|
|
|
Width="Auto" |
|
|
|
MinWidth="0" |
|
|
|
MinHeight="0" |
|
|
|
Margin="2" |
|
|
|
ClickMode="Press" |
|
|
|
Focusable="false" |
|
|
|
IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" |
|
|
|
Style="{StaticResource ComboBoxTransparentButtonStyle}" /> |
|
|
|
</Grid> |
|
|
|
</Border> |
|
|
|
<ControlTemplate.Triggers> |
|
|
|
<MultiTrigger> |
|
|
|
<MultiTrigger.Conditions> |
|
|
|
<!--<Condition Property="IsSelectionBoxHighlighted" Value="true"/>--> |
|
|
|
<Condition Property="IsDropDownOpen" Value="false" /> |
|
|
|
</MultiTrigger.Conditions> |
|
|
|
<Setter Property="Foreground" Value="{DynamicResource foreground}" /> |
|
|
|
</MultiTrigger> |
|
|
|
<!--<Trigger Property="IsSelectionBoxHighlighted" Value="true"> |
|
|
|
<Setter Property="Background" TargetName="SelectedItemBorder" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/> |
|
|
|
</Trigger>--> |
|
|
|
<Trigger Property="HasItems" Value="false"> |
|
|
|
<Setter TargetName="DropDownBorder" Property="MinHeight" Value="95" /> |
|
|
|
</Trigger> |
|
|
|
<Trigger Property="IsEnabled" Value="false"> |
|
|
|
<Setter Property="Foreground" Value="{DynamicResource foreground}" /> |
|
|
|
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" /> |
|
|
|
</Trigger> |
|
|
|
<MultiTrigger> |
|
|
|
<MultiTrigger.Conditions> |
|
|
|
<Condition Property="IsGrouping" Value="true" /> |
|
|
|
<Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" /> |
|
|
|
</MultiTrigger.Conditions> |
|
|
|
<Setter Property="ScrollViewer.CanContentScroll" Value="false" /> |
|
|
|
</MultiTrigger> |
|
|
|
<Trigger SourceName="PART_Popup" Property="HasDropShadow" Value="true"> |
|
|
|
<Setter TargetName="Shdw" Property="Margin" Value="0,0,5,5" /> |
|
|
|
<Setter TargetName="Shdw" Property="Color" Value="#71000000" /> |
|
|
|
</Trigger> |
|
|
|
<Trigger SourceName="DropDownScrollViewer" Property="ScrollViewer.CanContentScroll" Value="false"> |
|
|
|
<Setter TargetName="OpaqueRect" Property="Canvas.Top" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}" /> |
|
|
|
<Setter TargetName="OpaqueRect" Property="Canvas.Left" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}" /> |
|
|
|
</Trigger> |
|
|
|
</ControlTemplate.Triggers> |
|
|
|
</ControlTemplate> |
|
|
|
</Setter.Value> |
|
|
|
</Setter> |
|
|
|
<Style.Triggers> |
|
|
|
<Trigger Property="IsEditable" Value="true"> |
|
|
|
<Setter Property="IsTabStop" Value="false" /> |
|
|
|
<Setter Property="Padding" Value="1" /> |
|
|
|
<Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}" /> |
|
|
|
</Trigger> |
|
|
|
</Style.Triggers> |
|
|
|
|
|
|
|
</Style> |
|
|
|
|
|
|
|
<Style TargetType="{x:Type ctrl:TheComboBox}"> |
|
|
|
<Setter Property="FocusVisualStyle" Value="{StaticResource ComboBoxFocusVisual}" /> |
|
|
@@ -1010,9 +908,9 @@ |
|
|
|
|
|
|
|
</Style> |
|
|
|
|
|
|
|
<Style BasedOn="{StaticResource BaseComboBoxStyle}" TargetType="ComboBox" /> |
|
|
|
|
|
|
|
|
|
|
|
<Style x:Key="DesignTheDataGrid" TargetType="{x:Type ctrl:TheDataGrid}"> |
|
|
|
<Style TargetType="{x:Type ctrl:TheDataGrid}"> |
|
|
|
<Setter Property="AutoGenerateColumns" Value="False" /> |
|
|
|
<Setter Property="Background" Value="Transparent" /> |
|
|
|
<Setter Property="CanUserAddRows" Value="False" /> |
|
|
@@ -1258,7 +1156,7 @@ |
|
|
|
|
|
|
|
<SolidColorBrush x:Key="ListBorder" Color="#828790" /> |
|
|
|
|
|
|
|
<Style x:Key="DesignTheListBox" TargetType="{x:Type ListBox}"> |
|
|
|
<Style TargetType="{x:Type ctrl:TheListBox}"> |
|
|
|
<Setter Property="Background" Value="Transparent" /> |
|
|
|
<Setter Property="BorderBrush" Value="{StaticResource ListBorder}" /> |
|
|
|
<Setter Property="BorderThickness" Value="0" /> |
|
|
@@ -1349,13 +1247,14 @@ |
|
|
|
</Setter.Value> |
|
|
|
</Setter> |
|
|
|
</Style> |
|
|
|
|
|
|
|
<Style TargetType="{x:Type ctrl:TheRadioButton}"> |
|
|
|
<Setter Property="FocusVisualStyle" Value="{StaticResource CheckRadioFocusVisual}" /> |
|
|
|
<Setter Property="Foreground" Value="{DynamicResource foreground}" /> |
|
|
|
<Setter Property="VerticalContentAlignment" Value="Center" /> |
|
|
|
<Setter Property="Background"> |
|
|
|
<Setter.Value> |
|
|
|
<ImageBrush ImageSource="../Images/btn_normal.png" /> |
|
|
|
<ImageBrush ImageSource="../Images/btnnormal.png" /> |
|
|
|
</Setter.Value> |
|
|
|
</Setter> |
|
|
|
<Setter Property="Padding" Value="2,0,0,0" /> |
|
|
|