feat: finish.

This commit is contained in:
rabbitism
2024-10-03 01:50:07 +08:00
parent 3189968128
commit d52f97a058
19 changed files with 211 additions and 270 deletions

View File

@@ -267,11 +267,13 @@
<!-- Pointerover State -->
<Style Selector="^:pointerover">
<Setter Property="Foreground" Value="{DynamicResource ComboBoxItemPointeroverForeground}" />
<Setter Property="Background" Value="{DynamicResource ListBoxItemPointeroverBackground}" />
</Style>
<!-- Pressed State -->
<Style Selector="^:pressed">
<Setter Property="Foreground" Value="{DynamicResource ComboBoxItemPressedForeground}" />
<Setter Property="Background" Value="{DynamicResource ListBoxItemPressedBackground}" />
</Style>

View File

@@ -10,7 +10,7 @@
Margin="2"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="{DynamicResource SemiBlue1}"
Background="{DynamicResource SelectionListIndicatorBackground}"
Theme="{DynamicResource CardBorder}" />
</Template>
</Setter>

View File

@@ -6,7 +6,7 @@
<ControlTheme x:Key="{x:Type u:TagInput}" TargetType="u:TagInput">
<Setter Property="InputTheme" Value="{DynamicResource TagInputTextBoxTheme}" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="MinHeight" Value="{DynamicResource TagInputDefaultHeight}" />
<Setter Property="MinHeight" Value="{DynamicResource TextBoxDefaultHeight}" />
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="ItemTemplate">
<DataTemplate>
@@ -22,8 +22,8 @@
VerticalAlignment="Stretch"
Background="{DynamicResource TextBoxDefaultBackground}"
BorderBrush="{DynamicResource TextBoxDefaultBorderBrush}"
BorderThickness="1"
CornerRadius="3">
BorderThickness="{DynamicResource TextBoxBorderThickness}"
CornerRadius="{DynamicResource TextBoxDefaultCornerRadius}">
<Panel HorizontalAlignment="Stretch">
<TextBlock
Name="{x:Static u:TagInput.PART_Watermark}"
@@ -53,6 +53,7 @@
</Style>
<Style Selector="^:pointerover /template/ Border#PART_BackgroundBorder">
<Setter Property="Background" Value="{DynamicResource TextBoxPointeroverBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource TextBoxPointeroverBorderBrush}" />
</Style>
<Style Selector="^:focus-within /template/ Border#PART_BackgroundBorder">
<Setter Property="BorderBrush" Value="{DynamicResource TextBoxFocusBorderBrush}" />
@@ -60,13 +61,13 @@
</ControlTheme>
<ControlTheme x:Key="TagInputTextBoxTheme" TargetType="TextBox">
<Setter Property="TextBox.Foreground" Value="{DynamicResource TextBoxForeground}" />
<Setter Property="TextBox.Background" Value="{DynamicResource TextBoxDefaultBackground}" />
<Setter Property="TextBox.BorderBrush" Value="{DynamicResource TextBoxDefaultBorderBrush}" />
<Setter Property="TextBox.SelectionBrush" Value="{DynamicResource TextBoxSelectionBackground}" />
<Setter Property="TextBox.SelectionForegroundBrush" Value="{DynamicResource TextBoxSelectionForeground}" />
<Setter Property="TextBox.Cursor" Value="Ibeam" />
<Setter Property="TextBox.CaretBrush" Value="{DynamicResource TextBoxTextCaretBrush}" />
<Setter Property="Foreground" Value="{DynamicResource TextBoxInnerForeground}" />
<Setter Property="Background" Value="{DynamicResource TextBoxDefaultBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource TextBoxDefaultBorderBrush}" />
<Setter Property="SelectionBrush" Value="{DynamicResource TextBoxSelectionBackground}" />
<Setter Property="SelectionForegroundBrush" Value="{DynamicResource TextBoxSelectionForeground}" />
<Setter Property="Cursor" Value="Ibeam" />
<Setter Property="CaretBrush" Value="{DynamicResource TextBoxTextCaretBrush}" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="ScrollViewer.IsScrollChainingEnabled" Value="True" />
@@ -106,10 +107,10 @@
<ControlTheme x:Key="{x:Type u:ClosableTag}" TargetType="u:ClosableTag">
<Setter Property="VerticalAlignment" Value="Stretch" />
<Setter Property="u:ClosableTag.Foreground" Value="{DynamicResource LabelTagLightGreyForeground}" />
<Setter Property="u:ClosableTag.Background" Value="{DynamicResource ClosableTagBackground}" />
<Setter Property="u:ClosableTag.BorderBrush" Value="{DynamicResource SemiColorBorder}" />
<Setter Property="u:ClosableTag.BorderThickness" Value="1" />
<Setter Property="Foreground" Value="{DynamicResource ClosableTagForeground}" />
<Setter Property="Background" Value="{DynamicResource ClosableTagBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource ClosableTagBorder}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Template">
<ControlTemplate TargetType="u:ClosableTag">

View File

@@ -1,79 +0,0 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- Add Resources Here -->
<ControlTheme x:Key="LooklessTextBox" TargetType="TextBox">
<Setter Property="TextBox.Foreground" Value="{DynamicResource TextBoxForeground}" />
<Setter Property="TextBox.SelectionBrush" Value="{DynamicResource TextBoxSelectionBackground}" />
<Setter Property="TextBox.SelectionForegroundBrush" Value="{DynamicResource TextBoxSelectionForeground}" />
<Setter Property="TextBox.FontSize" Value="14" />
<Setter Property="TextBox.Cursor" Value="Ibeam" />
<Setter Property="TextBox.CaretBrush" Value="{DynamicResource TextBoxTextCaretBrush}" />
<Setter Property="TextBox.Padding" Value="{DynamicResource TextBoxContentPadding}" />
<Setter Property="TextBox.MinHeight" Value="{DynamicResource TextBoxDefaultHeight}" />
<Setter Property="TextBox.VerticalAlignment" Value="Center" />
<Setter Property="TextBox.VerticalContentAlignment" Value="Center" />
<Setter Property="TextBox.FocusAdorner" Value="{x:Null}" />
<Setter Property="ScrollViewer.IsScrollChainingEnabled" Value="True" />
<Setter Property="TextBox.Template">
<ControlTemplate TargetType="TextBox">
<Border Name="PART_ContentPresenterBorder" MinHeight="{TemplateBinding MinHeight}">
<Grid Margin="{TemplateBinding Padding}" ColumnDefinitions="Auto, *, Auto">
<ContentPresenter
Grid.Column="0"
Padding="{DynamicResource TextBoxInnerLeftContentPadding}"
VerticalAlignment="Center"
Content="{TemplateBinding InnerLeftContent}"
Foreground="{DynamicResource TextBoxInnerForeground}"
IsVisible="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=InnerLeftContent, Converter={x:Static ObjectConverters.IsNotNull}}" />
<ScrollViewer
Grid.Column="1"
AllowAutoHide="{TemplateBinding (ScrollViewer.AllowAutoHide)}"
HorizontalScrollBarVisibility="{TemplateBinding (ScrollViewer.HorizontalScrollBarVisibility)}"
IsScrollChainingEnabled="{TemplateBinding (ScrollViewer.IsScrollChainingEnabled)}"
VerticalScrollBarVisibility="{TemplateBinding (ScrollViewer.VerticalScrollBarVisibility)}">
<Panel>
<TextBlock
Name="PART_Watermark"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
IsVisible="{TemplateBinding Text,
Converter={x:Static StringConverters.IsNullOrEmpty}}"
Opacity="0.5"
Text="{TemplateBinding Watermark}"
TextAlignment="{TemplateBinding TextAlignment}"
TextWrapping="{TemplateBinding TextWrapping}" />
<TextPresenter
Name="PART_TextPresenter"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
CaretBrush="{TemplateBinding CaretBrush}"
CaretIndex="{TemplateBinding CaretIndex}"
LineHeight="{TemplateBinding LineHeight}"
PasswordChar="{TemplateBinding PasswordChar}"
RevealPassword="{TemplateBinding RevealPassword}"
SelectionBrush="{TemplateBinding SelectionBrush}"
SelectionEnd="{TemplateBinding SelectionEnd}"
SelectionForegroundBrush="{TemplateBinding SelectionForegroundBrush}"
SelectionStart="{TemplateBinding SelectionStart}"
Text="{TemplateBinding Text,
Mode=TwoWay}"
TextAlignment="{TemplateBinding TextAlignment}"
TextWrapping="{TemplateBinding TextWrapping}" />
</Panel>
</ScrollViewer>
<ContentPresenter
Grid.Column="2"
Padding="{DynamicResource TextBoxInnerRightContentPadding}"
VerticalAlignment="Center"
Content="{TemplateBinding InnerRightContent}"
Foreground="{DynamicResource TextBoxInnerForeground}"
IsVisible="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=InnerRightContent, Converter={x:Static ObjectConverters.IsNotNull}}" />
</Grid>
</Border>
</ControlTemplate>
</Setter>
<Style Selector="^:disabled">
<Setter Property="Foreground" Value="{DynamicResource TextBoxDisabledForeground}" />
</Style>
</ControlTheme>
</ResourceDictionary>

View File

@@ -1,52 +1,58 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:u="https://irihi.tech/ursa">
<!-- Add Resources Here -->
<ResourceDictionary
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:u="https://irihi.tech/ursa">
<!-- Add Resources Here -->
<Design.PreviewWith>
<StackPanel Margin="20">
<TextBlock Text="Hello World"/>
<TextBlock Text="Hello World" />
</StackPanel>
</Design.PreviewWith>
<ControlTheme x:Key="{x:Type u:TimeBox}" TargetType="{x:Type u:TimeBox}">
<Setter Property="u:TimeBox.Focusable" Value="True"/>
<Setter Property="u:TimeBox.ShowLeadingZero" Value="True"/>
<Setter Property="u:TimeBox.TextAlignment" Value="Center"/>
<Setter Property="u:TimeBox.HorizontalAlignment" Value="Left"/>
<Setter Property="u:TimeBox.CornerRadius" Value="{DynamicResource TimeBoxCornerRadius}" />
<Setter Property="u:TimeBox.Background" Value="{DynamicResource TimeBoxBackground}" />
<Setter Property="u:TimeBox.MinHeight" Value="{DynamicResource TimeBoxDefaultMinHeight}" />
<Setter Property="u:TimeBox.BorderThickness" Value="{DynamicResource TimeBoxBorderThickness}" />
<Setter Property="u:TimeBox.SelectionBrush" Value="{DynamicResource TimeBoxSelectionBrush}" />
<Setter Property="u:TimeBox.SelectionForegroundBrush" Value="{DynamicResource TimeBoxSelectionForeground}" />
<Setter Property="u:TimeBox.CaretBrush" Value="{DynamicResource TimeBoxCaretBrush}" />
<Setter Property="u:TimeBox.Template">
<Setter Property="Focusable" Value="True" />
<Setter Property="ShowLeadingZero" Value="True" />
<Setter Property="TextAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="CornerRadius" Value="{DynamicResource TextBoxDefaultCornerRadius}" />
<Setter Property="Background" Value="{DynamicResource TextBoxDefaultBackground}" />
<Setter Property="MinHeight" Value="{DynamicResource TextBoxDefaultHeight}" />
<Setter Property="BorderBrush" Value="{DynamicResource TextBoxDefaultBorderBrush}" />
<Setter Property="BorderThickness" Value="{DynamicResource TextBoxBorderThickness}" />
<Setter Property="SelectionBrush" Value="{DynamicResource TextBoxSelectionBackground}" />
<Setter Property="SelectionForegroundBrush" Value="{DynamicResource TextBoxSelectionForeground}" />
<Setter Property="CaretBrush" Value="{DynamicResource TextBoxTextCaretBrush}" />
<Setter Property="Template">
<ControlTemplate TargetType="u:TimeBox">
<Border Name="PART_Border"
<Border
Name="PART_Border"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}">
<Grid Width="{TemplateBinding Width}" ColumnDefinitions="1*, Auto, 1*, Auto, 1*, Auto, 1*">
<Border Name="{x:Static u:TimeBox.PART_HourBorder}"
Grid.Column="0"
Background="Transparent"
BorderBrush="Transparent"
BorderThickness="0"
CornerRadius="{TemplateBinding CornerRadius}">
<Border
Name="{x:Static u:TimeBox.PART_HourBorder}"
Grid.Column="0"
Background="Transparent"
BorderBrush="Transparent"
BorderThickness="0"
CornerRadius="{TemplateBinding CornerRadius}">
<Grid>
<TextPresenter Name="{x:Static u:TimeBox.PART_HoursTextPresenter}"
MinWidth="8"
VerticalAlignment="Center"
CaretBrush="{TemplateBinding CaretBrush}"
Cursor="IBeam"
SelectionBrush="{TemplateBinding SelectionBrush}"
SelectionForegroundBrush="{TemplateBinding SelectionForegroundBrush}"
TextAlignment="{TemplateBinding TextAlignment}"/>
<Panel Name="{x:Static u:TimeBox.PART_HourDragPanel}"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="Transparent"/>
<TextPresenter
Name="{x:Static u:TimeBox.PART_HoursTextPresenter}"
MinWidth="8"
VerticalAlignment="Center"
CaretBrush="{TemplateBinding CaretBrush}"
Cursor="IBeam"
SelectionBrush="{TemplateBinding SelectionBrush}"
SelectionForegroundBrush="{TemplateBinding SelectionForegroundBrush}"
TextAlignment="{TemplateBinding TextAlignment}" />
<Panel
Name="{x:Static u:TimeBox.PART_HourDragPanel}"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="Transparent" />
</Grid>
</Border>
<TextBlock
@@ -55,25 +61,28 @@
VerticalAlignment="Center"
Focusable="False"
Text=":" />
<Border Name="{x:Static u:TimeBox.PART_MinuteBorder}"
Grid.Column="2"
Background="Transparent"
BorderBrush="Transparent"
BorderThickness="0"
CornerRadius="{TemplateBinding CornerRadius}">
<Border
Name="{x:Static u:TimeBox.PART_MinuteBorder}"
Grid.Column="2"
Background="Transparent"
BorderBrush="Transparent"
BorderThickness="0"
CornerRadius="{TemplateBinding CornerRadius}">
<Grid>
<TextPresenter Name="{x:Static u:TimeBox.PART_MinuteTextPresenter}"
MinWidth="8"
VerticalAlignment="Center"
CaretBrush="{TemplateBinding CaretBrush}"
Cursor="IBeam"
SelectionBrush="{TemplateBinding SelectionBrush}"
SelectionForegroundBrush="{TemplateBinding SelectionForegroundBrush}"
TextAlignment="{TemplateBinding TextAlignment}"/>
<Panel Name="{x:Static u:TimeBox.PART_MinuteDragPanel}"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="Transparent"/>
<TextPresenter
Name="{x:Static u:TimeBox.PART_MinuteTextPresenter}"
MinWidth="8"
VerticalAlignment="Center"
CaretBrush="{TemplateBinding CaretBrush}"
Cursor="IBeam"
SelectionBrush="{TemplateBinding SelectionBrush}"
SelectionForegroundBrush="{TemplateBinding SelectionForegroundBrush}"
TextAlignment="{TemplateBinding TextAlignment}" />
<Panel
Name="{x:Static u:TimeBox.PART_MinuteDragPanel}"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="Transparent" />
</Grid>
</Border>
<TextBlock
@@ -82,25 +91,28 @@
VerticalAlignment="Center"
Focusable="False"
Text=":" />
<Border Name="{x:Static u:TimeBox.PART_SecondBorder}"
Grid.Column="4"
Background="Transparent"
BorderBrush="Transparent"
BorderThickness="0"
CornerRadius="{TemplateBinding CornerRadius}">
<Border
Name="{x:Static u:TimeBox.PART_SecondBorder}"
Grid.Column="4"
Background="Transparent"
BorderBrush="Transparent"
BorderThickness="0"
CornerRadius="{TemplateBinding CornerRadius}">
<Grid>
<TextPresenter Name="{x:Static u:TimeBox.PART_SecondTextPresenter}"
MinWidth="8"
VerticalAlignment="Center"
CaretBrush="{TemplateBinding CaretBrush}"
Cursor="IBeam"
SelectionBrush="{TemplateBinding SelectionBrush}"
SelectionForegroundBrush="{TemplateBinding SelectionForegroundBrush}"
TextAlignment="{TemplateBinding TextAlignment}"/>
<Panel Name="{x:Static u:TimeBox.PART_SecondDragPanel}"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="Transparent"/>
<TextPresenter
Name="{x:Static u:TimeBox.PART_SecondTextPresenter}"
MinWidth="8"
VerticalAlignment="Center"
CaretBrush="{TemplateBinding CaretBrush}"
Cursor="IBeam"
SelectionBrush="{TemplateBinding SelectionBrush}"
SelectionForegroundBrush="{TemplateBinding SelectionForegroundBrush}"
TextAlignment="{TemplateBinding TextAlignment}" />
<Panel
Name="{x:Static u:TimeBox.PART_SecondDragPanel}"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="Transparent" />
</Grid>
</Border>
<TextBlock
@@ -109,25 +121,28 @@
VerticalAlignment="Center"
Focusable="False"
Text="." />
<Border Name="{x:Static u:TimeBox.PART_MilliSecondBorder}"
Grid.Column="6"
Background="Transparent"
BorderBrush="Transparent"
BorderThickness="0"
CornerRadius="{TemplateBinding CornerRadius}">
<Border
Name="{x:Static u:TimeBox.PART_MilliSecondBorder}"
Grid.Column="6"
Background="Transparent"
BorderBrush="Transparent"
BorderThickness="0"
CornerRadius="{TemplateBinding CornerRadius}">
<Grid>
<TextPresenter Name="{x:Static u:TimeBox.PART_MillisecondTextPresenter}"
MinWidth="8"
VerticalAlignment="Center"
CaretBrush="{TemplateBinding CaretBrush}"
Cursor="IBeam"
SelectionBrush="{TemplateBinding SelectionBrush}"
SelectionForegroundBrush="{TemplateBinding SelectionForegroundBrush}"
TextAlignment="{TemplateBinding TextAlignment}"/>
<Panel Name="{x:Static u:TimeBox.PART_MilliSecondDragPanel}"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="Transparent"/>
<TextPresenter
Name="{x:Static u:TimeBox.PART_MillisecondTextPresenter}"
MinWidth="8"
VerticalAlignment="Center"
CaretBrush="{TemplateBinding CaretBrush}"
Cursor="IBeam"
SelectionBrush="{TemplateBinding SelectionBrush}"
SelectionForegroundBrush="{TemplateBinding SelectionForegroundBrush}"
TextAlignment="{TemplateBinding TextAlignment}" />
<Panel
Name="{x:Static u:TimeBox.PART_MilliSecondDragPanel}"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="Transparent" />
</Grid>
</Border>
</Grid>
@@ -135,20 +150,21 @@
</ControlTemplate>
</Setter>
<Style Selector="^:focus-within">
<Setter Property="Border.BorderBrush" Value="{DynamicResource TimeBoxFocusBorderBrush}" />
<Setter Property="Border.BorderBrush" Value="{DynamicResource TextBoxFocusBorderBrush}" />
</Style>
<Style Selector="^:disabled">
<Setter Property="Background" Value="{DynamicResource TimeBoxDisabledBackground}" />
<Setter Property="Foreground" Value="{DynamicResource SemiColorDisabledText}" />
<Setter Property="Background" Value="{DynamicResource TextBoxDisabledBackground}" />
<Setter Property="Foreground" Value="{DynamicResource TextBoxDisabledForeground}" />
<Setter Property="BorderBrush" Value="{DynamicResource TextBoxDisabledBorderBrush}" />
</Style>
<Style Selector="^[DragOrientation=Horizontal]">
<Style Selector="^/template/ Panel">
<Setter Property="Cursor" Value="SizeWestEast"/>
<Setter Property="Cursor" Value="SizeWestEast" />
</Style>
</Style>
<Style Selector="^[DragOrientation=Vertical]">
<Style Selector="^/template/ Panel">
<Setter Property="Cursor" Value="SizeNorthSouth"/>
<Setter Property="Cursor" Value="SizeNorthSouth" />
</Style>
</Style>
</ControlTheme>

View File

@@ -18,7 +18,7 @@
<Setter Property="Background" Value="{DynamicResource ComboBoxSelectorBackground}" />
<Setter Property="CornerRadius" Value="{DynamicResource ComboBoxSelectorCornerRadius}" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="BorderBrush" Value="{DynamicResource ComboBoxSelectorBorderBrush}"></Setter>
<Setter Property="BorderBrush" Value="{DynamicResource ComboBoxSelectorBorderBrush}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="MinHeight" Value="{DynamicResource ComboBoxDefaultHeight}" />
<Setter Property="Cursor" Value="Hand" />
@@ -69,7 +69,7 @@
</ContentPresenter>
<ContentPresenter
Grid.Column="2"
Margin="0 0 8 0"
Margin="0,0,8,0"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
Content="{TemplateBinding InnerRightContent}"
@@ -79,11 +79,11 @@
<Button
Name="PART_ClearButton"
Grid.Column="3"
Command="{Binding $parent[u:TreeComboBox].Clear}"
Margin="0,0,8,0"
Command="{Binding $parent[u:TreeComboBox].Clear}"
Content="{DynamicResource IconButtonClearData}"
IsVisible="False"
Theme="{DynamicResource InnerIconButton}"
Content="{DynamicResource IconButtonClearData}" />
Theme="{DynamicResource InnerIconButton}" />
<PathIcon
x:Name="DropDownGlyph"
@@ -95,8 +95,8 @@
VerticalAlignment="Center"
Data="{DynamicResource ComboBoxIcon}"
Foreground="{DynamicResource ComboBoxIconDefaultForeground}"
UseLayoutRounding="False"
IsHitTestVisible="True" />
IsHitTestVisible="True"
UseLayoutRounding="False" />
<Popup
Name="{x:Static iri:PartNames.PART_Popup}"
@@ -112,27 +112,27 @@
<Border
Name="PopupBorder"
Margin="0,4"
BorderThickness="{DynamicResource ComboBoxPopupBorderThickness}"
Background="{DynamicResource ComboBoxPopupBackground}"
BorderBrush="{DynamicResource ComboBoxPopupBorderBrush}"
BorderThickness="{DynamicResource ComboBoxPopupBorderThickness}"
BoxShadow="{DynamicResource ComboBoxPopupBoxShadow}"
ClipToBounds="True"
CornerRadius="6">
<DockPanel LastChildFill="True">
<ContentPresenter
Name="PART_PopupHeader"
Margin="8,8 8 0"
IsVisible="{TemplateBinding PopupInnerTopContent,
Converter={x:Static ObjectConverters.IsNotNull}}"
Margin="8,8,8,0"
Content="{TemplateBinding PopupInnerTopContent}"
DockPanel.Dock="Top" />
DockPanel.Dock="Top"
IsVisible="{TemplateBinding PopupInnerTopContent,
Converter={x:Static ObjectConverters.IsNotNull}}" />
<ContentPresenter
Name="PART_PopupFooter"
Margin="8 0 8 8"
IsVisible="{TemplateBinding PopupInnerBottomContent,
Converter={x:Static ObjectConverters.IsNotNull}}"
Margin="8,0,8,8"
Content="{TemplateBinding PopupInnerBottomContent}"
DockPanel.Dock="Bottom" />
DockPanel.Dock="Bottom"
IsVisible="{TemplateBinding PopupInnerBottomContent,
Converter={x:Static ObjectConverters.IsNotNull}}" />
<ScrollViewer HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}">
<ItemsPresenter ItemsPanel="{TemplateBinding ItemsPanel}" />
</ScrollViewer>
@@ -142,23 +142,23 @@
</Grid>
</ControlTemplate>
</Setter>
<Style Selector="^.clearButton, ^.ClearButton">
<Style Selector="^:pointerover /template/ Button#PART_ClearButton">
<Setter Property="IsVisible" Value="{Binding $parent[u:TreeComboBox].SelectionBoxItem, Converter={x:Static ObjectConverters.IsNotNull}}"/>
<Setter Property="IsVisible" Value="{Binding $parent[u:TreeComboBox].SelectionBoxItem, Converter={x:Static ObjectConverters.IsNotNull}}" />
</Style>
<Style Selector="^:pointerover /template/ PathIcon#DropDownGlyph">
<Setter Property="IsVisible" Value="{Binding $parent[u:TreeComboBox].SelectionBoxItem, Converter={x:Static ObjectConverters.IsNull}}"/>
<Setter Property="IsVisible" Value="{Binding $parent[u:TreeComboBox].SelectionBoxItem, Converter={x:Static ObjectConverters.IsNull}}" />
</Style>
</Style>
<Style Selector="^.Large">
<Setter Property="MinHeight" Value="{DynamicResource ComboBoxLargeHeight}"/>
<Setter Property="MinHeight" Value="{DynamicResource ComboBoxLargeHeight}" />
</Style>
<Style Selector="^.Small">
<Setter Property="MinHeight" Value="{DynamicResource ComboBoxSmallHeight}"/>
<Setter Property="MinHeight" Value="{DynamicResource ComboBoxSmallHeight}" />
</Style>
<!-- Pointerover State -->
<Style Selector="^:pointerover">
<Setter Property="Background" Value="{DynamicResource ComboBoxSelectorPointeroverBackground}" />
@@ -218,7 +218,7 @@
<Setter Property="Background" Value="{DynamicResource TreeViewItemDefaultBackground}" />
<Setter Property="Foreground" Value="{DynamicResource TreeViewItemDefaultForeground}" />
<Setter Property="CornerRadius" Value="3" />
<Setter Property="MinHeight" Value="32"></Setter>
<Setter Property="MinHeight" Value="32" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Template">
<ControlTemplate TargetType="u:TreeComboBoxItem">
@@ -266,11 +266,10 @@
</ControlTemplate>
</Setter>
<!-- Pointerover state -->
<Style Selector="^ /template/ Border#PART_LayoutRoot:pointerover">
<Setter Property="Background" Value="{DynamicResource TreeViewItemPointeroverBackground}" />
</Style>
<!-- Pressed state -->
<Style Selector="^:pressed /template/ Border#PART_LayoutRoot:pointerover">
<Setter Property="Background" Value="{DynamicResource TreeViewItemPressedBackground}" />
@@ -288,6 +287,12 @@
<Style Selector="^:selected /template/ Border#PART_LayoutRoot">
<Setter Property="Background" Value="{DynamicResource TreeViewItemSelectedBackground}" />
</Style>
<Style Selector="^:selected /template/ ContentPresenter#PART_HeaderPresenter">
<Setter Property="Foreground" Value="{DynamicResource TreeViewItemSelectedForeground}" />
</Style>
<Style Selector="^:selected /template/ ToggleButton#PART_ExpandCollapseChevron">
<Setter Property="Foreground" Value="{DynamicResource TreeViewItemSelectedForeground}" />
</Style>
<!-- Disabled Selected state -->
<Style Selector="^:disabled:selected /template/ Border#PART_LayoutRoot">

View File

@@ -41,7 +41,6 @@
<ResourceInclude Source="ScrollToButton.axaml" />
<ResourceInclude Source="SelectionList.axaml" />
<ResourceInclude Source="TagInput.axaml" />
<ResourceInclude Source="TextBox.axaml" />
<ResourceInclude Source="ThemeSelector.axaml" />
<ResourceInclude Source="TimePicker.axaml" />
<ResourceInclude Source="TimeRangePicker.axaml" />