|
@@ -14,12 +14,245 @@
|
|
</Border>
|
|
</Border>
|
|
|
|
|
|
<TextBlock
|
|
<TextBlock
|
|
|
|
+ HorizontalAlignment="Right"
|
|
Background="Transparent"
|
|
Background="Transparent"
|
|
Foreground="Red"
|
|
Foreground="Red"
|
|
Text="{Binding /ErrorContent}" />
|
|
Text="{Binding /ErrorContent}" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</ControlTemplate>
|
|
</ControlTemplate>
|
|
|
|
|
|
|
|
+ <Style x:Key="ScrollBarThumb" TargetType="{x:Type Thumb}">
|
|
|
|
+ <Setter Property="OverridesDefaultStyle" Value="true" />
|
|
|
|
+ <Setter Property="IsTabStop" Value="false" />
|
|
|
|
+ <Setter Property="Template">
|
|
|
|
+ <Setter.Value>
|
|
|
|
+ <ControlTemplate TargetType="{x:Type Thumb}">
|
|
|
|
+ <Grid>
|
|
|
|
+ <Rectangle
|
|
|
|
+ Fill="#0c9ea1"
|
|
|
|
+ RadiusX="3"
|
|
|
|
+ RadiusY="3" />
|
|
|
|
+ </Grid>
|
|
|
|
+ </ControlTemplate>
|
|
|
|
+ </Setter.Value>
|
|
|
|
+ </Setter>
|
|
|
|
+ </Style>
|
|
|
|
+
|
|
|
|
+ <Style x:Key="HorizontalScrollBarPageButton" TargetType="{x:Type RepeatButton}">
|
|
|
|
+ <Setter Property="OverridesDefaultStyle" Value="true" />
|
|
|
|
+ <Setter Property="Background" Value="Transparent" />
|
|
|
|
+ <Setter Property="Focusable" Value="false" />
|
|
|
|
+ <Setter Property="IsTabStop" Value="false" />
|
|
|
|
+ <Setter Property="Opacity" Value="0" />
|
|
|
|
+ <Setter Property="Template">
|
|
|
|
+ <Setter.Value>
|
|
|
|
+ <ControlTemplate TargetType="{x:Type RepeatButton}">
|
|
|
|
+ <Rectangle
|
|
|
|
+ Width="{TemplateBinding Width}"
|
|
|
|
+ Height="{TemplateBinding Height}"
|
|
|
|
+ Fill="{TemplateBinding Background}" />
|
|
|
|
+ </ControlTemplate>
|
|
|
|
+ </Setter.Value>
|
|
|
|
+ </Setter>
|
|
|
|
+ </Style>
|
|
|
|
+
|
|
|
|
+ <Style x:Key="VerticalScrollBarPageButton" TargetType="{x:Type RepeatButton}">
|
|
|
|
+ <Setter Property="OverridesDefaultStyle" Value="true" />
|
|
|
|
+ <Setter Property="Background" Value="Transparent" />
|
|
|
|
+ <Setter Property="Focusable" Value="false" />
|
|
|
|
+ <Setter Property="IsTabStop" Value="false" />
|
|
|
|
+ <Setter Property="Opacity" Value="0" />
|
|
|
|
+ <Setter Property="Template">
|
|
|
|
+ <Setter.Value>
|
|
|
|
+ <ControlTemplate TargetType="{x:Type RepeatButton}">
|
|
|
|
+ <Rectangle
|
|
|
|
+ Width="{TemplateBinding Width}"
|
|
|
|
+ Height="{TemplateBinding Height}"
|
|
|
|
+ Fill="{TemplateBinding Background}" />
|
|
|
|
+ </ControlTemplate>
|
|
|
|
+ </Setter.Value>
|
|
|
|
+ </Setter>
|
|
|
|
+ </Style>
|
|
|
|
+
|
|
|
|
+ <Style x:Key="ForScrollbar" TargetType="{x:Type ScrollBar}">
|
|
|
|
+ <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false" />
|
|
|
|
+ <Setter Property="Stylus.IsFlicksEnabled" Value="false" />
|
|
|
|
+ <Setter Property="Background" Value="Transparent" />
|
|
|
|
+ <Setter Property="Margin" Value="0,1,1,6" />
|
|
|
|
+ <Setter Property="Width" Value="5" />
|
|
|
|
+ <Setter Property="MinWidth" Value="5" />
|
|
|
|
+ <Setter Property="Opacity" Value="0" />
|
|
|
|
+ <Setter Property="Template">
|
|
|
|
+ <Setter.Value>
|
|
|
|
+ <ControlTemplate TargetType="{x:Type ScrollBar}">
|
|
|
|
+ <Grid x:Name="Bg" SnapsToDevicePixels="true">
|
|
|
|
+ <Track
|
|
|
|
+ x:Name="PART_Track"
|
|
|
|
+ IsDirectionReversed="true"
|
|
|
|
+ IsEnabled="{TemplateBinding IsMouseOver}">
|
|
|
|
+ <Track.DecreaseRepeatButton>
|
|
|
|
+ <RepeatButton Command="{x:Static ScrollBar.PageUpCommand}" Style="{StaticResource VerticalScrollBarPageButton}" />
|
|
|
|
+ </Track.DecreaseRepeatButton>
|
|
|
|
+ <Track.IncreaseRepeatButton>
|
|
|
|
+ <RepeatButton Command="{x:Static ScrollBar.PageDownCommand}" Style="{StaticResource VerticalScrollBarPageButton}" />
|
|
|
|
+ </Track.IncreaseRepeatButton>
|
|
|
|
+ <Track.Thumb>
|
|
|
|
+ <Thumb Style="{StaticResource ScrollBarThumb}" />
|
|
|
|
+ </Track.Thumb>
|
|
|
|
+ </Track>
|
|
|
|
+ </Grid>
|
|
|
|
+ </ControlTemplate>
|
|
|
|
+ </Setter.Value>
|
|
|
|
+ </Setter>
|
|
|
|
+ <Style.Triggers>
|
|
|
|
+ <Trigger Property="Orientation" Value="Horizontal">
|
|
|
|
+ <Setter Property="Background" Value="Transparent" />
|
|
|
|
+ <Setter Property="Margin" Value="1,0,6,1" />
|
|
|
|
+ <Setter Property="Height" Value="5" />
|
|
|
|
+ <Setter Property="MinHeight" Value="5" />
|
|
|
|
+ <Setter Property="Width" Value="Auto" />
|
|
|
|
+ <Setter Property="Opacity" Value="0" />
|
|
|
|
+ <Setter Property="Template">
|
|
|
|
+ <Setter.Value>
|
|
|
|
+ <ControlTemplate TargetType="{x:Type ScrollBar}">
|
|
|
|
+ <Grid x:Name="Bg" SnapsToDevicePixels="true">
|
|
|
|
+ <Track x:Name="PART_Track" IsEnabled="{TemplateBinding IsMouseOver}">
|
|
|
|
+ <Track.DecreaseRepeatButton>
|
|
|
|
+ <RepeatButton Command="{x:Static ScrollBar.PageLeftCommand}" Style="{StaticResource HorizontalScrollBarPageButton}" />
|
|
|
|
+ </Track.DecreaseRepeatButton>
|
|
|
|
+ <Track.IncreaseRepeatButton>
|
|
|
|
+ <RepeatButton Command="{x:Static ScrollBar.PageRightCommand}" Style="{StaticResource HorizontalScrollBarPageButton}" />
|
|
|
|
+ </Track.IncreaseRepeatButton>
|
|
|
|
+ <Track.Thumb>
|
|
|
|
+ <Thumb Style="{StaticResource ScrollBarThumb}" />
|
|
|
|
+ </Track.Thumb>
|
|
|
|
+ </Track>
|
|
|
|
+ </Grid>
|
|
|
|
+ </ControlTemplate>
|
|
|
|
+ </Setter.Value>
|
|
|
|
+ </Setter>
|
|
|
|
+ </Trigger>
|
|
|
|
+ </Style.Triggers>
|
|
|
|
+ </Style>
|
|
|
|
+
|
|
|
|
+ <Style x:Key="ForScrollViewer" TargetType="{x:Type ScrollViewer}">
|
|
|
|
+ <Setter Property="BorderBrush" Value="LightGray" />
|
|
|
|
+ <Setter Property="BorderThickness" Value="0" />
|
|
|
|
+ <Setter Property="HorizontalContentAlignment" Value="Left" />
|
|
|
|
+ <Setter Property="HorizontalScrollBarVisibility" Value="Auto" />
|
|
|
|
+ <Setter Property="VerticalContentAlignment" Value="Top" />
|
|
|
|
+ <Setter Property="VerticalScrollBarVisibility" Value="Auto" />
|
|
|
|
+ <Setter Property="Template">
|
|
|
|
+ <Setter.Value>
|
|
|
|
+ <ControlTemplate TargetType="{x:Type ScrollViewer}">
|
|
|
|
+ <Border
|
|
|
|
+ BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
|
+ BorderThickness="{TemplateBinding BorderThickness}"
|
|
|
|
+ SnapsToDevicePixels="True">
|
|
|
|
+ <Grid Background="{TemplateBinding Background}">
|
|
|
|
+ <ScrollContentPresenter
|
|
|
|
+ Margin="{TemplateBinding Padding}"
|
|
|
|
+ ContentTemplate="{TemplateBinding ContentTemplate}"
|
|
|
|
+ Cursor="{TemplateBinding Cursor}" />
|
|
|
|
+ <ScrollBar
|
|
|
|
+ x:Name="PART_VerticalScrollBar"
|
|
|
|
+ HorizontalAlignment="Right"
|
|
|
|
+ Maximum="{TemplateBinding ScrollableHeight}"
|
|
|
|
+ Orientation="Vertical"
|
|
|
|
+ Style="{StaticResource ForScrollbar}"
|
|
|
|
+ ViewportSize="{TemplateBinding ViewportHeight}"
|
|
|
|
+ Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
|
|
|
|
+ Value="{TemplateBinding VerticalOffset}" />
|
|
|
|
+ <ScrollBar
|
|
|
|
+ x:Name="PART_HorizontalScrollBar"
|
|
|
|
+ VerticalAlignment="Bottom"
|
|
|
|
+ Maximum="{TemplateBinding ScrollableWidth}"
|
|
|
|
+ Orientation="Horizontal"
|
|
|
|
+ Style="{StaticResource ForScrollbar}"
|
|
|
|
+ ViewportSize="{TemplateBinding ViewportWidth}"
|
|
|
|
+ Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
|
|
|
|
+ Value="{TemplateBinding HorizontalOffset}" />
|
|
|
|
+ </Grid>
|
|
|
|
+ </Border>
|
|
|
|
+ <ControlTemplate.Triggers>
|
|
|
|
+ <EventTrigger RoutedEvent="ScrollChanged">
|
|
|
|
+ <BeginStoryboard>
|
|
|
|
+ <Storyboard>
|
|
|
|
+ <DoubleAnimation
|
|
|
|
+ Storyboard.TargetName="PART_VerticalScrollBar"
|
|
|
|
+ Storyboard.TargetProperty="Opacity"
|
|
|
|
+ To="1"
|
|
|
|
+ Duration="0:0:1" />
|
|
|
|
+ <DoubleAnimation
|
|
|
|
+ BeginTime="0:0:1"
|
|
|
|
+ Storyboard.TargetName="PART_VerticalScrollBar"
|
|
|
|
+ Storyboard.TargetProperty="Opacity"
|
|
|
|
+ To="0"
|
|
|
|
+ Duration="0:0:1" />
|
|
|
|
+ <DoubleAnimation
|
|
|
|
+ Storyboard.TargetName="PART_HorizontalScrollBar"
|
|
|
|
+ Storyboard.TargetProperty="Opacity"
|
|
|
|
+ To="1"
|
|
|
|
+ Duration="0:0:1" />
|
|
|
|
+ <DoubleAnimation
|
|
|
|
+ BeginTime="0:0:1"
|
|
|
|
+ Storyboard.TargetName="PART_HorizontalScrollBar"
|
|
|
|
+ Storyboard.TargetProperty="Opacity"
|
|
|
|
+ To="0"
|
|
|
|
+ Duration="0:0:1" />
|
|
|
|
+ </Storyboard>
|
|
|
|
+ </BeginStoryboard>
|
|
|
|
+ </EventTrigger>
|
|
|
|
+ <EventTrigger RoutedEvent="MouseEnter" SourceName="PART_VerticalScrollBar">
|
|
|
|
+ <BeginStoryboard>
|
|
|
|
+ <Storyboard>
|
|
|
|
+ <DoubleAnimation
|
|
|
|
+ Storyboard.TargetName="PART_VerticalScrollBar"
|
|
|
|
+ Storyboard.TargetProperty="Opacity"
|
|
|
|
+ To="1"
|
|
|
|
+ Duration="0:0:1" />
|
|
|
|
+ </Storyboard>
|
|
|
|
+ </BeginStoryboard>
|
|
|
|
+ </EventTrigger>
|
|
|
|
+ <EventTrigger RoutedEvent="MouseLeave" SourceName="PART_VerticalScrollBar">
|
|
|
|
+ <BeginStoryboard>
|
|
|
|
+ <Storyboard>
|
|
|
|
+ <DoubleAnimation
|
|
|
|
+ Storyboard.TargetName="PART_VerticalScrollBar"
|
|
|
|
+ Storyboard.TargetProperty="Opacity"
|
|
|
|
+ To="0"
|
|
|
|
+ Duration="0:0:1" />
|
|
|
|
+ </Storyboard>
|
|
|
|
+ </BeginStoryboard>
|
|
|
|
+ </EventTrigger>
|
|
|
|
+ <EventTrigger RoutedEvent="MouseEnter" SourceName="PART_HorizontalScrollBar">
|
|
|
|
+ <BeginStoryboard>
|
|
|
|
+ <Storyboard>
|
|
|
|
+ <DoubleAnimation
|
|
|
|
+ Storyboard.TargetName="PART_HorizontalScrollBar"
|
|
|
|
+ Storyboard.TargetProperty="Opacity"
|
|
|
|
+ To="1"
|
|
|
|
+ Duration="0:0:1" />
|
|
|
|
+ </Storyboard>
|
|
|
|
+ </BeginStoryboard>
|
|
|
|
+ </EventTrigger>
|
|
|
|
+ <EventTrigger RoutedEvent="MouseLeave" SourceName="PART_HorizontalScrollBar">
|
|
|
|
+ <BeginStoryboard>
|
|
|
|
+ <Storyboard>
|
|
|
|
+ <DoubleAnimation
|
|
|
|
+ Storyboard.TargetName="PART_HorizontalScrollBar"
|
|
|
|
+ Storyboard.TargetProperty="Opacity"
|
|
|
|
+ To="0"
|
|
|
|
+ Duration="0:0:1" />
|
|
|
|
+ </Storyboard>
|
|
|
|
+ </BeginStoryboard>
|
|
|
|
+ </EventTrigger>
|
|
|
|
+ </ControlTemplate.Triggers>
|
|
|
|
+ </ControlTemplate>
|
|
|
|
+ </Setter.Value>
|
|
|
|
+ </Setter>
|
|
|
|
+ </Style>
|
|
|
|
+
|
|
<Style x:Key="ExpandCollapseToggleStyle" TargetType="{x:Type ToggleButton}">
|
|
<Style x:Key="ExpandCollapseToggleStyle" TargetType="{x:Type ToggleButton}">
|
|
<Setter Property="Focusable" Value="False" />
|
|
<Setter Property="Focusable" Value="False" />
|
|
<Setter Property="Width" Value="20" />
|
|
<Setter Property="Width" Value="20" />
|
|
@@ -159,17 +392,17 @@
|
|
<Label
|
|
<Label
|
|
x:Name="downArrow"
|
|
x:Name="downArrow"
|
|
Grid.Column="1"
|
|
Grid.Column="1"
|
|
- Width="28"
|
|
|
|
- Height="28"
|
|
|
|
Margin="6,0,6,0"
|
|
Margin="6,0,6,0"
|
|
|
|
+ HorizontalContentAlignment="Center"
|
|
|
|
+ VerticalContentAlignment="Center"
|
|
Content="{x:Static utils:RegularFontUtil.Chevron_Down_48}"
|
|
Content="{x:Static utils:RegularFontUtil.Chevron_Down_48}"
|
|
FontFamily="{DynamicResource FluentSystemIconsRegular}" />
|
|
FontFamily="{DynamicResource FluentSystemIconsRegular}" />
|
|
<Label
|
|
<Label
|
|
x:Name="upArrow"
|
|
x:Name="upArrow"
|
|
Grid.Column="1"
|
|
Grid.Column="1"
|
|
- Width="28"
|
|
|
|
- Height="28"
|
|
|
|
Margin="6,0,6,0"
|
|
Margin="6,0,6,0"
|
|
|
|
+ HorizontalContentAlignment="Center"
|
|
|
|
+ VerticalContentAlignment="Center"
|
|
Content="{x:Static utils:RegularFontUtil.Chevron_Up_48}"
|
|
Content="{x:Static utils:RegularFontUtil.Chevron_Up_48}"
|
|
FontFamily="{DynamicResource FluentSystemIconsRegular}"
|
|
FontFamily="{DynamicResource FluentSystemIconsRegular}"
|
|
Visibility="Collapsed" />
|
|
Visibility="Collapsed" />
|
|
@@ -230,15 +463,14 @@
|
|
IsHitTestVisible="False" />
|
|
IsHitTestVisible="False" />
|
|
<TextBox
|
|
<TextBox
|
|
x:Name="PART_EditableTextBox"
|
|
x:Name="PART_EditableTextBox"
|
|
- Margin="3,3,23,3"
|
|
|
|
- HorizontalAlignment="Left"
|
|
|
|
- VerticalAlignment="Bottom"
|
|
|
|
|
|
+ HorizontalAlignment="Center"
|
|
|
|
+ VerticalAlignment="Center"
|
|
Background="Transparent"
|
|
Background="Transparent"
|
|
Focusable="True"
|
|
Focusable="True"
|
|
IsReadOnly="{TemplateBinding IsReadOnly}"
|
|
IsReadOnly="{TemplateBinding IsReadOnly}"
|
|
Style="{x:Null}"
|
|
Style="{x:Null}"
|
|
Template="{StaticResource ComboBoxTextBox}"
|
|
Template="{StaticResource ComboBoxTextBox}"
|
|
- Visibility="Hidden" />
|
|
|
|
|
|
+ Visibility="Visible" />
|
|
<Popup
|
|
<Popup
|
|
x:Name="Popup"
|
|
x:Name="Popup"
|
|
MaxHeight="{TemplateBinding MaxDropDownHeight}"
|
|
MaxHeight="{TemplateBinding MaxDropDownHeight}"
|
|
@@ -258,15 +490,17 @@
|
|
<Border
|
|
<Border
|
|
x:Name="DropDownBorder"
|
|
x:Name="DropDownBorder"
|
|
BorderBrush="#E4E9F2"
|
|
BorderBrush="#E4E9F2"
|
|
- BorderThickness="1,1,1,1">
|
|
|
|
|
|
+ BorderThickness="1,1,1,1"
|
|
|
|
+ CornerRadius="5">
|
|
<Border.Background>
|
|
<Border.Background>
|
|
<SolidColorBrush Color="White" />
|
|
<SolidColorBrush Color="White" />
|
|
</Border.Background>
|
|
</Border.Background>
|
|
</Border>
|
|
</Border>
|
|
<ScrollViewer
|
|
<ScrollViewer
|
|
- Margin="1,5"
|
|
|
|
|
|
+ Margin="1,3"
|
|
Padding="0"
|
|
Padding="0"
|
|
- SnapsToDevicePixels="True">
|
|
|
|
|
|
+ SnapsToDevicePixels="True"
|
|
|
|
+ Style="{StaticResource ForScrollViewer}">
|
|
<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" />
|
|
<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" />
|
|
</ScrollViewer>
|
|
</ScrollViewer>
|
|
|
|
|
|
@@ -304,21 +538,19 @@
|
|
<Style BasedOn="{StaticResource {x:Type ComboBoxItem}}" TargetType="ComboBoxItem">
|
|
<Style BasedOn="{StaticResource {x:Type ComboBoxItem}}" TargetType="ComboBoxItem">
|
|
<Setter Property="Foreground" Value="#3E434D" />
|
|
<Setter Property="Foreground" Value="#3E434D" />
|
|
<Setter Property="Height" Value="36" />
|
|
<Setter Property="Height" Value="36" />
|
|
|
|
+ <Setter Property="VerticalContentAlignment" Value="Center" />
|
|
|
|
+ <Setter Property="HorizontalContentAlignment" Value="Center" />
|
|
<Setter Property="Template">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ComboBoxItem">
|
|
<ControlTemplate TargetType="ComboBoxItem">
|
|
<Border
|
|
<Border
|
|
x:Name="Border"
|
|
x:Name="Border"
|
|
- Padding="6,10,6,0"
|
|
|
|
- VerticalAlignment="Center"
|
|
|
|
|
|
+ Height="{TemplateBinding Height}"
|
|
Background="Transparent"
|
|
Background="Transparent"
|
|
SnapsToDevicePixels="true">
|
|
SnapsToDevicePixels="true">
|
|
<ContentPresenter
|
|
<ContentPresenter
|
|
- Width="{TemplateBinding Width}"
|
|
|
|
- Height="{TemplateBinding Height}"
|
|
|
|
- Margin="{TemplateBinding Margin}"
|
|
|
|
- HorizontalAlignment="Center"
|
|
|
|
- VerticalAlignment="{TemplateBinding VerticalAlignment}"
|
|
|
|
|
|
+ HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
|
|
+ VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
Content="{TemplateBinding Content}"
|
|
Content="{TemplateBinding Content}"
|
|
ContentTemplate="{TemplateBinding ContentTemplate}" />
|
|
ContentTemplate="{TemplateBinding ContentTemplate}" />
|
|
</Border>
|
|
</Border>
|
|
@@ -338,5 +570,4 @@
|
|
</Setter>
|
|
</Setter>
|
|
</Style>
|
|
</Style>
|
|
|
|
|
|
-
|
|
|
|
</ResourceDictionary>
|
|
</ResourceDictionary>
|