misc: format codes.

This commit is contained in:
Zhang Dian
2024-10-15 16:03:42 +08:00
parent 39be4fd1cd
commit dc20007039
27 changed files with 92 additions and 102 deletions

View File

@@ -30,10 +30,4 @@
<ItemGroup> <ItemGroup>
<Folder Include="Models\" /> <Folder Include="Models\" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Reference Include="Semi.Avalonia">
<HintPath>Assets\Semi.Avalonia.dll</HintPath>
</Reference>
</ItemGroup>
</Project> </Project>

View File

@@ -4,10 +4,10 @@
xmlns:u="https://irihi.tech/ursa"> xmlns:u="https://irihi.tech/ursa">
<!-- Add Resources Here --> <!-- Add Resources Here -->
<ControlTheme x:Key="{x:Type u:Banner}" TargetType="u:Banner"> <ControlTheme x:Key="{x:Type u:Banner}" TargetType="u:Banner">
<Setter Property="u:Banner.BorderThickness" Value="{DynamicResource BannerBorderThickness}" /> <Setter Property="BorderThickness" Value="{DynamicResource BannerBorderThickness}" />
<Setter Property="u:Banner.BorderBrush" Value="{DynamicResource BannerBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource BannerBorderBrush}" />
<Setter Property="u:Banner.HorizontalContentAlignment" Value="Center" /> <Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="u:Banner.Template"> <Setter Property="Template">
<ControlTemplate TargetType="u:Banner"> <ControlTemplate TargetType="u:Banner">
<Border <Border
Name="PART_Container" Name="PART_Container"

View File

@@ -56,13 +56,13 @@
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
<Style Selector="^ /template/ ContentPresenter#PART_IconPresenter"> <Style Selector="^ /template/ ContentPresenter#PART_IconPresenter">
<Setter Property="Margin" Value="0 0 4 0"></Setter> <Setter Property="Margin" Value="0 0 4 0" />
</Style> </Style>
<Style Selector="^ /template/ ContentPresenter#Separator"> <Style Selector="^ /template/ ContentPresenter#Separator">
<Setter Property="Margin" Value="4 0"></Setter> <Setter Property="Margin" Value="4 0" />
</Style> </Style>
<Style Selector="^[IsReadOnly=False]"> <Style Selector="^[IsReadOnly=False]">
<Setter Property="Cursor" Value="Hand"></Setter> <Setter Property="Cursor" Value="Hand" />
</Style> </Style>
<Style Selector="^:last"> <Style Selector="^:last">
<Style Selector="^ /template/ ContentPresenter#PART_IconPresenter"> <Style Selector="^ /template/ ContentPresenter#PART_IconPresenter">

View File

@@ -16,13 +16,13 @@
<Setter Property="Background" Value="{DynamicResource ButtonGroupDefaultBackground}" /> <Setter Property="Background" Value="{DynamicResource ButtonGroupDefaultBackground}" />
<Setter Property="CornerRadius" Value="3" /> <Setter Property="CornerRadius" Value="3" />
<Setter Property="ClipToBounds" Value="True" /> <Setter Property="ClipToBounds" Value="True" />
<Setter Property="u:ButtonGroup.ItemContainerTheme" Value="{DynamicResource ButtonGroupItemTheme}" /> <Setter Property="ItemContainerTheme" Value="{DynamicResource ButtonGroupItemTheme}" />
<Setter Property="u:ButtonGroup.ItemsPanel"> <Setter Property="ItemsPanel">
<ItemsPanelTemplate> <ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" /> <StackPanel Orientation="Horizontal" />
</ItemsPanelTemplate> </ItemsPanelTemplate>
</Setter> </Setter>
<Setter Property="u:ButtonGroup.Template"> <Setter Property="Template">
<ControlTemplate TargetType="u:ButtonGroup"> <ControlTemplate TargetType="u:ButtonGroup">
<Border <Border
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
@@ -43,7 +43,7 @@
<Setter Property="Padding" Value="{DynamicResource ButtonGroupDefaultPadding}" /> <Setter Property="Padding" Value="{DynamicResource ButtonGroupDefaultPadding}" />
<Setter Property="FontWeight" Value="{DynamicResource ButtonGroupDefaultFontWeight}" /> <Setter Property="FontWeight" Value="{DynamicResource ButtonGroupDefaultFontWeight}" />
<Setter Property="Cursor" Value="Hand" /> <Setter Property="Cursor" Value="Hand" />
<Setter Property="Button.Template"> <Setter Property="Template">
<ControlTemplate TargetType="Button"> <ControlTemplate TargetType="Button">
<DockPanel LastChildFill="True"> <DockPanel LastChildFill="True">
<Rectangle <Rectangle

View File

@@ -7,7 +7,7 @@
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="u:DisableContainer"> <ControlTemplate TargetType="u:DisableContainer">
<Panel> <Panel>
<ContentPresenter Content="{TemplateBinding Content}"></ContentPresenter> <ContentPresenter Content="{TemplateBinding Content}" />
<iri:PureRectangle Background="Transparent" IsVisible="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content.IsEnabled, Converter={x:Static BoolConverters.Not}}" Cursor="No" ToolTip.Tip="{TemplateBinding DisabledTip}"/> <iri:PureRectangle Background="Transparent" IsVisible="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content.IsEnabled, Converter={x:Static BoolConverters.Not}}" Cursor="No" ToolTip.Tip="{TemplateBinding DisabledTip}"/>
</Panel> </Panel>
</ControlTemplate> </ControlTemplate>

View File

@@ -9,28 +9,28 @@
</Design.PreviewWith> </Design.PreviewWith>
<!-- Add Resources Here --> <!-- Add Resources Here -->
<ControlTheme x:Key="DividerLeftLine" TargetType="{x:Type Rectangle}"> <ControlTheme x:Key="DividerLeftLine" TargetType="{x:Type Rectangle}">
<Setter Property="Rectangle.Fill" Value="{DynamicResource DividerBorderBrush}" /> <Setter Property="Fill" Value="{DynamicResource DividerBorderBrush}" />
<Setter Property="Rectangle.Height" Value="{DynamicResource SizeDividerWidth}" /> <Setter Property="Height" Value="{DynamicResource SizeDividerWidth}" />
<Setter Property="Rectangle.MinWidth" Value="{DynamicResource SizeDividerLeftMinWidth}" /> <Setter Property="MinWidth" Value="{DynamicResource SizeDividerLeftMinWidth}" />
<Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="VerticalAlignment" Value="Center" />
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="DividerRightLine" TargetType="{x:Type Rectangle}"> <ControlTheme x:Key="DividerRightLine" TargetType="{x:Type Rectangle}">
<Setter Property="Rectangle.Fill" Value="{DynamicResource DividerBorderBrush}" /> <Setter Property="Fill" Value="{DynamicResource DividerBorderBrush}" />
<Setter Property="Rectangle.Height" Value="{DynamicResource SizeDividerWidth}" /> <Setter Property="Height" Value="{DynamicResource SizeDividerWidth}" />
<Setter Property="Rectangle.MinWidth" Value="{DynamicResource SizeDividerRightMinWidth}" /> <Setter Property="MinWidth" Value="{DynamicResource SizeDividerRightMinWidth}" />
<Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="VerticalAlignment" Value="Center" />
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="DividerContentPresenter" TargetType="{x:Type ContentPresenter}"> <ControlTheme x:Key="DividerContentPresenter" TargetType="{x:Type ContentPresenter}">
<Setter Property="ContentPresenter.Content" Value="{TemplateBinding Content}" /> <Setter Property="Content" Value="{TemplateBinding Content}" />
<Setter Property="ContentPresenter.Background" Value="{TemplateBinding Background}" /> <Setter Property="Background" Value="{TemplateBinding Background}" />
<Setter Property="TextElement.Foreground" Value="{TemplateBinding Foreground}" /> <Setter Property="Foreground" Value="{TemplateBinding Foreground}" />
<Setter Property="ContentPresenter.ContentTemplate" Value="{TemplateBinding ContentTemplate}" /> <Setter Property="ContentTemplate" Value="{TemplateBinding ContentTemplate}" />
<Setter Property="TextElement.FontFamily" Value="{TemplateBinding FontFamily}" /> <Setter Property="FontFamily" Value="{TemplateBinding FontFamily}" />
<Setter Property="TextElement.FontWeight" Value="{TemplateBinding FontWeight}" /> <Setter Property="FontWeight" Value="{TemplateBinding FontWeight}" />
<Setter Property="TextElement.FontSize" Value="{TemplateBinding FontSize}" /> <Setter Property="FontSize" Value="{TemplateBinding FontSize}" />
<Setter Property="ContentPresenter.Margin" Value="{DynamicResource ThicknessDividerTextMargin}" /> <Setter Property="Margin" Value="{DynamicResource ThicknessDividerTextMargin}" />
<Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="VerticalAlignment" Value="Center" />
</ControlTheme> </ControlTheme>
@@ -123,4 +123,4 @@
</Setter> </Setter>
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -4,19 +4,19 @@
xmlns:u="https://irihi.tech/ursa" xmlns:u="https://irihi.tech/ursa"
xmlns:converters="clr-namespace:Ursa.Converters;assembly=Ursa"> xmlns:converters="clr-namespace:Ursa.Converters;assembly=Ursa">
<ControlTheme x:Key="{x:Type u:DualBadge}" TargetType="u:DualBadge"> <ControlTheme x:Key="{x:Type u:DualBadge}" TargetType="u:DualBadge">
<Setter Property="u:DualBadge.CornerRadius" Value="{DynamicResource DualBadgeDefaultCornerRadius}" /> <Setter Property="CornerRadius" Value="{DynamicResource DualBadgeDefaultCornerRadius}" />
<Setter Property="u:DualBadge.FontSize" Value="{DynamicResource DualBadgeDefaultFontSize}" /> <Setter Property="FontSize" Value="{DynamicResource DualBadgeDefaultFontSize}" />
<Setter Property="u:DualBadge.IconForeground" Value="{DynamicResource DualBadgeDefaultIconForeground}" /> <Setter Property="IconForeground" Value="{DynamicResource DualBadgeDefaultIconForeground}" />
<Setter Property="u:DualBadge.HeaderForeground" Value="{DynamicResource DualBadgeDefaultHeaderForeground}" /> <Setter Property="HeaderForeground" Value="{DynamicResource DualBadgeDefaultHeaderForeground}" />
<Setter Property="u:DualBadge.HeaderBackground" Value="{DynamicResource DualBadgeDefaultHeaderBackground}" /> <Setter Property="HeaderBackground" Value="{DynamicResource DualBadgeDefaultHeaderBackground}" />
<Setter Property="u:DualBadge.Foreground" Value="{DynamicResource DualBadgeDefaultForeground}" /> <Setter Property="Foreground" Value="{DynamicResource DualBadgeDefaultForeground}" />
<Setter Property="u:DualBadge.Background" Value="{DynamicResource DualBadgeFlatGreenBackground}" /> <Setter Property="Background" Value="{DynamicResource DualBadgeFlatGreenBackground}" />
<Setter Property="u:DualBadge.ClipToBounds" Value="{DynamicResource DualBadgeDefaultClipToBounds}" /> <Setter Property="ClipToBounds" Value="{DynamicResource DualBadgeDefaultClipToBounds}" />
<Setter Property="u:DualBadge.HorizontalAlignment" Value="{DynamicResource DualBadgeDefaultHorizontalAlignment}" /> <Setter Property="HorizontalAlignment" Value="{DynamicResource DualBadgeDefaultHorizontalAlignment}" />
<Setter Property="u:DualBadge.VerticalAlignment" Value="{DynamicResource DualBadgeDefaultVerticalAlignment}" /> <Setter Property="VerticalAlignment" Value="{DynamicResource DualBadgeDefaultVerticalAlignment}" />
<Setter Property="u:DualBadge.UseLayoutRounding" Value="{DynamicResource DualBadgeDefaultUseLayoutRounding}" /> <Setter Property="UseLayoutRounding" Value="{DynamicResource DualBadgeDefaultUseLayoutRounding}" />
<Setter Property="u:DualBadge.Padding" Value="{DynamicResource DualBadgeDefaultPadding}" /> <Setter Property="Padding" Value="{DynamicResource DualBadgeDefaultPadding}" />
<Setter Property="u:DualBadge.Template"> <Setter Property="Template">
<ControlTemplate TargetType="{x:Type u:DualBadge}"> <ControlTemplate TargetType="{x:Type u:DualBadge}">
<Border <Border
HorizontalAlignment="{TemplateBinding HorizontalAlignment}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}"

View File

@@ -19,14 +19,14 @@
<Style Selector="^[DisplayDescription=True] /template/ ComboBox"> <Style Selector="^[DisplayDescription=True] /template/ ComboBox">
<Setter Property="ItemTemplate"> <Setter Property="ItemTemplate">
<DataTemplate x:DataType="u:EnumItemTuple"> <DataTemplate x:DataType="u:EnumItemTuple">
<TextBlock Text="{Binding DisplayName}"></TextBlock> <TextBlock Text="{Binding DisplayName}" />
</DataTemplate> </DataTemplate>
</Setter> </Setter>
</Style> </Style>
<Style Selector="^[DisplayDescription=False] /template/ ComboBox"> <Style Selector="^[DisplayDescription=False] /template/ ComboBox">
<Setter Property="ItemTemplate"> <Setter Property="ItemTemplate">
<DataTemplate x:DataType="u:EnumItemTuple"> <DataTemplate x:DataType="u:EnumItemTuple">
<TextBlock Text="{Binding Value}"></TextBlock> <TextBlock Text="{Binding Value}" />
</DataTemplate> </DataTemplate>
</Setter> </Setter>
</Style> </Style>

View File

@@ -43,8 +43,8 @@
<Setter Property="BorderBrush" Value="{DynamicResource TextBoxDefaultBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource TextBoxDefaultBorderBrush}" />
<Setter Property="CaretBrush" Value="{DynamicResource TextBoxTextCaretBrush}" /> <Setter Property="CaretBrush" Value="{DynamicResource TextBoxTextCaretBrush}" />
<Setter Property="ContextFlyout" Value="{DynamicResource IPv4BoxMenuFlyout}" /> <Setter Property="ContextFlyout" Value="{DynamicResource IPv4BoxMenuFlyout}" />
<Setter Property="FocusAdorner" Value="{x:Null}"></Setter> <Setter Property="FocusAdorner" Value="{x:Null}" />
<Setter Property="u:IPv4Box.Template"> <Setter Property="Template">
<ControlTemplate TargetType="u:IPv4Box"> <ControlTemplate TargetType="u:IPv4Box">
<Border <Border
Name="PART_Border" Name="PART_Border"

View File

@@ -109,7 +109,7 @@
</Style> </Style>
<Style Selector="^:empty[IsLoading=False] /template/ ContentPresenter#PART_ContentPresenter"> <Style Selector="^:empty[IsLoading=False] /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Margin" Value="0"></Setter> <Setter Property="Margin" Value="0" />
</Style> </Style>
<Style Selector="^:right"> <Style Selector="^:right">

View File

@@ -12,7 +12,7 @@
<Setter Property="BorderBrush" Value="{DynamicResource TextBoxDefaultBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource TextBoxDefaultBorderBrush}" />
<Setter Property="BorderThickness" Value="{DynamicResource TextBoxBorderThickness}" /> <Setter Property="BorderThickness" Value="{DynamicResource TextBoxBorderThickness}" />
<Setter Property="CornerRadius" Value="{DynamicResource TextBoxDefaultCornerRadius}" /> <Setter Property="CornerRadius" Value="{DynamicResource TextBoxDefaultCornerRadius}" />
<Setter Property="HorizontalContentAlignment" Value="Center"></Setter> <Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="Padding" Value="8 0" /> <Setter Property="Padding" Value="8 0" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="u:KeyGestureInput"> <ControlTemplate TargetType="u:KeyGestureInput">

View File

@@ -7,7 +7,7 @@
<!-- Add Resources Here --> <!-- Add Resources Here -->
<converters:BrushToColorConverter x:Key="BrushToColorConverter" /> <converters:BrushToColorConverter x:Key="BrushToColorConverter" />
<ControlTheme x:Key="{x:Type u:LoadingIcon}" TargetType="u:LoadingIcon"> <ControlTheme x:Key="{x:Type u:LoadingIcon}" TargetType="u:LoadingIcon">
<Setter Property="IsLoading" Value="True"></Setter> <Setter Property="IsLoading" Value="True" />
<Setter Property="Foreground" Value="{DynamicResource LoadingIconForeground}" /> <Setter Property="Foreground" Value="{DynamicResource LoadingIconForeground}" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="u:LoadingIcon"> <ControlTemplate TargetType="u:LoadingIcon">

View File

@@ -155,7 +155,7 @@
<ControlTheme x:Key="{x:Type u:MessageBoxControl}" TargetType="u:MessageBoxControl"> <ControlTheme x:Key="{x:Type u:MessageBoxControl}" TargetType="u:MessageBoxControl">
<Setter Property="CornerRadius" Value="12" /> <Setter Property="CornerRadius" Value="12" />
<Setter Property="Padding" Value="48 24" /> <Setter Property="Padding" Value="48 24" />
<Setter Property="u:DialogControlBase.CanDragMove" Value="True"></Setter> <Setter Property="u:DialogControlBase.CanDragMove" Value="True" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="u:MessageBoxControl"> <ControlTemplate TargetType="u:MessageBoxControl">
<Border <Border

View File

@@ -11,7 +11,7 @@
<Setter Property="BorderBrush" Value="{DynamicResource ComboBoxSelectorBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource ComboBoxSelectorBorderBrush}" />
<Setter Property="HorizontalAlignment" Value="Left" /> <Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="MaxDropdownHeight" Value="300" /> <Setter Property="MaxDropdownHeight" Value="300" />
<Setter Property="MaxSelectionBoxHeight" Value="270"></Setter> <Setter Property="MaxSelectionBoxHeight" Value="270" />
<Setter Property="MinHeight" Value="32" /> <Setter Property="MinHeight" Value="32" />
<Setter Property="Padding" Value="12 4" /> <Setter Property="Padding" Value="12 4" />
<Setter Property="BorderThickness" Value="1" /> <Setter Property="BorderThickness" Value="1" />

View File

@@ -19,11 +19,10 @@
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
HorizontalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Disabled"
AllowAutoHide="True" AllowAutoHide="True"
VerticalScrollBarVisibility="Auto"> VerticalScrollBarVisibility="Auto">
<ScrollViewer.Styles> <ScrollViewer.Styles>
<Style Selector="ScrollViewer /template/ ScrollBar"> <Style Selector="ScrollViewer /template/ ScrollBar">
<Setter Property="Opacity" Value="0"></Setter> <Setter Property="Opacity" Value="0" />
</Style> </Style>
<Style Selector="ScrollViewer:pointerover"> <Style Selector="ScrollViewer:pointerover">
<Style Selector="^ /template/ ScrollBar#PART_HorizontalScrollBar"> <Style Selector="^ /template/ ScrollBar#PART_HorizontalScrollBar">
@@ -40,11 +39,11 @@
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
<Style Selector="^:not(:horizontal-collapsed)"> <Style Selector="^:not(:horizontal-collapsed)">
<Setter Property="Width" Value="{Binding $self.ExpandWidth}"></Setter> <Setter Property="Width" Value="{Binding $self.ExpandWidth}" />
</Style> </Style>
<Style Selector="^:horizontal-collapsed"> <Style Selector="^:horizontal-collapsed">
<Setter Property="Width" Value="{Binding $self.CollapseWidth}" /> <Setter Property="Width" Value="{Binding $self.CollapseWidth}" />
<Setter Property="Grid.IsSharedSizeScope" Value="False"></Setter> <Setter Property="Grid.IsSharedSizeScope" Value="False" />
</Style> </Style>
</ControlTheme> </ControlTheme>
@@ -150,10 +149,10 @@
</Setter> </Setter>
<Setter Property="Template" Value="{StaticResource DefaultNavMenuItemTemplate}" /> <Setter Property="Template" Value="{StaticResource DefaultNavMenuItemTemplate}" />
<Style Selector="^:selected"> <Style Selector="^:selected">
<Setter Property="Foreground" Value="{DynamicResource ListBoxItemSelectedForeground}"></Setter> <Setter Property="Foreground" Value="{DynamicResource ListBoxItemSelectedForeground}" />
<Setter Property="Background" Value="{DynamicResource ListBoxItemSelectedBackground}" /> <Setter Property="Background" Value="{DynamicResource ListBoxItemSelectedBackground}" />
<Style Selector="^:pointerover"> <Style Selector="^:pointerover">
<Setter Property="Foreground" Value="{DynamicResource ListBoxItemSelectedForeground}"></Setter> <Setter Property="Foreground" Value="{DynamicResource ListBoxItemSelectedForeground}" />
<Setter Property="Background" Value="{DynamicResource ListBoxItemSelectedPointeroverBackground}" /> <Setter Property="Background" Value="{DynamicResource ListBoxItemSelectedPointeroverBackground}" />
</Style> </Style>
</Style> </Style>
@@ -176,9 +175,10 @@
<Style Selector="^:horizontal-collapsed:first-level"> <Style Selector="^:horizontal-collapsed:first-level">
<Setter Property="HorizontalAlignment" Value="Stretch" /> <Setter Property="HorizontalAlignment" Value="Stretch" />
<Style Selector="^ /template/ Border#PART_Border"> <Style Selector="^ /template/ Border#PART_Border">
<Setter Property="ToolTip.Tip" > <Setter Property="ToolTip.Tip">
<Template> <Template>
<ContentPresenter Content="{TemplateBinding u:NavMenuItem.Header}" ContentTemplate="{TemplateBinding u:NavMenuItem.HeaderTemplate}"></ContentPresenter> <ContentPresenter Content="{TemplateBinding u:NavMenuItem.Header}"
ContentTemplate="{TemplateBinding u:NavMenuItem.HeaderTemplate}" />
</Template> </Template>
</Setter> </Setter>
<Setter Property="ToolTip.ShowDelay" Value="0" /> <Setter Property="ToolTip.ShowDelay" Value="0" />
@@ -208,7 +208,7 @@
</Style> </Style>
</Style> </Style>
<Style Selector="^:horizontal-collapsed:first-level"> <Style Selector="^:horizontal-collapsed:first-level">
<Setter Property="Grid.IsSharedSizeScope" Value="True"></Setter> <Setter Property="Grid.IsSharedSizeScope" Value="True" />
</Style> </Style>
<Style Selector="^[IsSeparator=True]"> <Style Selector="^[IsSeparator=True]">
<Setter Property="Template"> <Setter Property="Template">
@@ -224,11 +224,11 @@
Content="{TemplateBinding Header}" Content="{TemplateBinding Header}"
ContentTemplate="{TemplateBinding HeaderTemplate}" ContentTemplate="{TemplateBinding HeaderTemplate}"
Foreground="{DynamicResource TextBlockQuaternaryForeground}" Foreground="{DynamicResource TextBlockQuaternaryForeground}"
IsVisible="{TemplateBinding Header, IsVisible="{TemplateBinding Header, Converter={x:Static ObjectConverters.IsNotNull}}">
Converter={x:Static ObjectConverters.IsNotNull}}">
<ContentPresenter.Styles> <ContentPresenter.Styles>
<Style Selector="TextBlock"> <Style Selector="TextBlock">
<Setter Property="FontSize" Value="{DynamicResource NavigationMenuSeparatorHeaderFontSize}" /> <Setter Property="FontSize"
Value="{DynamicResource NavigationMenuSeparatorHeaderFontSize}" />
</Style> </Style>
</ContentPresenter.Styles> </ContentPresenter.Styles>
</ContentPresenter> </ContentPresenter>
@@ -254,4 +254,4 @@
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -52,7 +52,7 @@
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="TinyPagination" TargetType="{x:Type u:Pagination}"> <ControlTheme x:Key="TinyPagination" TargetType="{x:Type u:Pagination}">
<Setter Property="DisplayCurrentPageInQuickJumper" Value="True"></Setter> <Setter Property="DisplayCurrentPageInQuickJumper" Value="True" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="u:Pagination"> <ControlTemplate TargetType="u:Pagination">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">

View File

@@ -11,7 +11,7 @@
<Setter Property="Width" Value="{DynamicResource TextBoxDefaultHeight}" /> <Setter Property="Width" Value="{DynamicResource TextBoxDefaultHeight}" />
<Setter Property="CornerRadius" Value="{DynamicResource TextBoxDefaultCornerRadius}" /> <Setter Property="CornerRadius" Value="{DynamicResource TextBoxDefaultCornerRadius}" />
<Setter Property="BorderThickness" Value="{DynamicResource TextBoxBorderThickness}" /> <Setter Property="BorderThickness" Value="{DynamicResource TextBoxBorderThickness}" />
<Setter Property="BorderBrush" Value="{DynamicResource TextBoxDefaultBorderBrush}"></Setter> <Setter Property="BorderBrush" Value="{DynamicResource TextBoxDefaultBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource TextBoxDefaultBackground}" /> <Setter Property="Background" Value="{DynamicResource TextBoxDefaultBackground}" />
<Setter Property="FocusAdorner" Value="{x:Null}" /> <Setter Property="FocusAdorner" Value="{x:Null}" />
<Setter Property="Template"> <Setter Property="Template">

View File

@@ -6,7 +6,7 @@
<ControlTheme x:Key="{x:Type u:ScrollToButton}" TargetType="u:ScrollToButton"> <ControlTheme x:Key="{x:Type u:ScrollToButton}" TargetType="u:ScrollToButton">
<Setter Property="HorizontalAlignment" Value="Right" /> <Setter Property="HorizontalAlignment" Value="Right" />
<Setter Property="VerticalAlignment" Value="Bottom" /> <Setter Property="VerticalAlignment" Value="Bottom" />
<Setter Property="Cursor" Value="Hand"></Setter> <Setter Property="Cursor" Value="Hand" />
<Setter Property="Margin" Value="0, 0, 16, 16" /> <Setter Property="Margin" Value="0, 0, 16, 16" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="u:ScrollToButton"> <ControlTemplate TargetType="u:ScrollToButton">
@@ -36,13 +36,13 @@
<Setter Property="Background" Value="{DynamicResource ButtonDefaultPressedBackground}" /> <Setter Property="Background" Value="{DynamicResource ButtonDefaultPressedBackground}" />
</Style> </Style>
<Style Selector="^[Direction=Right] /template/ PathIcon#PART_Icon"> <Style Selector="^[Direction=Right] /template/ PathIcon#PART_Icon">
<Setter Property="RenderTransform" Value="rotate(90deg)"></Setter> <Setter Property="RenderTransform" Value="rotate(90deg)" />
</Style> </Style>
<Style Selector="^[Direction=Bottom] /template/ PathIcon#PART_Icon"> <Style Selector="^[Direction=Bottom] /template/ PathIcon#PART_Icon">
<Setter Property="RenderTransform" Value="rotate(180deg)"></Setter> <Setter Property="RenderTransform" Value="rotate(180deg)" />
</Style> </Style>
<Style Selector="^[Direction=Left] /template/ PathIcon#PART_Icon"> <Style Selector="^[Direction=Left] /template/ PathIcon#PART_Icon">
<Setter Property="RenderTransform" Value="rotate(270deg)"></Setter> <Setter Property="RenderTransform" Value="rotate(270deg)" />
</Style> </Style>
</ControlTheme> </ControlTheme>
@@ -50,7 +50,7 @@
<ControlTheme x:Key="PrimaryScrollToButton" TargetType="u:ScrollToButton"> <ControlTheme x:Key="PrimaryScrollToButton" TargetType="u:ScrollToButton">
<Setter Property="HorizontalAlignment" Value="Right" /> <Setter Property="HorizontalAlignment" Value="Right" />
<Setter Property="VerticalAlignment" Value="Bottom" /> <Setter Property="VerticalAlignment" Value="Bottom" />
<Setter Property="Cursor" Value="Hand"></Setter> <Setter Property="Cursor" Value="Hand" />
<Setter Property="Margin" Value="0, 0, 16, 16" /> <Setter Property="Margin" Value="0, 0, 16, 16" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="u:ScrollToButton"> <ControlTemplate TargetType="u:ScrollToButton">
@@ -80,13 +80,13 @@
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPressedBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPressedBorderBrush}" />
</Style> </Style>
<Style Selector="^[Direction=Right] /template/ PathIcon#PART_Icon"> <Style Selector="^[Direction=Right] /template/ PathIcon#PART_Icon">
<Setter Property="RenderTransform" Value="rotate(90deg)"></Setter> <Setter Property="RenderTransform" Value="rotate(90deg)" />
</Style> </Style>
<Style Selector="^[Direction=Bottom] /template/ PathIcon#PART_Icon"> <Style Selector="^[Direction=Bottom] /template/ PathIcon#PART_Icon">
<Setter Property="RenderTransform" Value="rotate(180deg)"></Setter> <Setter Property="RenderTransform" Value="rotate(180deg)" />
</Style> </Style>
<Style Selector="^[Direction=Left] /template/ PathIcon#PART_Icon"> <Style Selector="^[Direction=Left] /template/ PathIcon#PART_Icon">
<Setter Property="RenderTransform" Value="rotate(270deg)"></Setter> <Setter Property="RenderTransform" Value="rotate(270deg)" />
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -14,7 +14,7 @@
Theme="{DynamicResource CardBorder}" /> Theme="{DynamicResource CardBorder}" />
</Template> </Template>
</Setter> </Setter>
<Setter Property="ListBox.Template"> <Setter Property="Template">
<ControlTemplate TargetType="u:SelectionList"> <ControlTemplate TargetType="u:SelectionList">
<Border <Border
Name="border" Name="border"

View File

@@ -30,14 +30,11 @@
Classes.Active="{Binding Path= IsActive, RelativeSource={RelativeSource TemplatedParent}}" Classes.Active="{Binding Path= IsActive, RelativeSource={RelativeSource TemplatedParent}}"
IsHitTestVisible="{TemplateBinding IsLoading}" IsHitTestVisible="{TemplateBinding IsLoading}"
Background="{DynamicResource SkeletonDefaultBackground}" Background="{DynamicResource SkeletonDefaultBackground}"
IsVisible="{TemplateBinding IsLoading}"> IsVisible="{TemplateBinding IsLoading}" />
</iri:PureRectangle>
<iri:PureRectangle <iri:PureRectangle
x:Name="PART_ActiveBorder" x:Name="PART_ActiveBorder"
IsHitTestVisible="{TemplateBinding IsLoading}" IsHitTestVisible="{TemplateBinding IsLoading}"
IsVisible="{TemplateBinding IsLoading}" IsVisible="{TemplateBinding IsLoading}" />
>
</iri:PureRectangle>
</Panel> </Panel>
</Border> </Border>
</ControlTemplate> </ControlTemplate>

View File

@@ -49,7 +49,7 @@
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
<Style Selector="^:empty /template/ TextBlock#PART_Watermark"> <Style Selector="^:empty /template/ TextBlock#PART_Watermark">
<Setter Property="IsVisible" Value="True"></Setter> <Setter Property="IsVisible" Value="True" />
</Style> </Style>
<Style Selector="^:pointerover /template/ Border#PART_BackgroundBorder"> <Style Selector="^:pointerover /template/ Border#PART_BackgroundBorder">
<Setter Property="Background" Value="{DynamicResource TextBoxPointeroverBackground}" /> <Setter Property="Background" Value="{DynamicResource TextBoxPointeroverBackground}" />

View File

@@ -20,16 +20,16 @@
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
<Style Selector="^:dark /template/ PathIcon#PART_Icon"> <Style Selector="^:dark /template/ PathIcon#PART_Icon">
<Setter Property="Data" Value="{DynamicResource ThemeSelectorButtonDarkGlyph}"></Setter> <Setter Property="Data" Value="{DynamicResource ThemeSelectorButtonDarkGlyph}" />
<Setter Property="ToolTip.Tip" Value="{DynamicResource STRING_THEME_TOGGLE_DARK}"></Setter> <Setter Property="ToolTip.Tip" Value="{DynamicResource STRING_THEME_TOGGLE_DARK}" />
</Style> </Style>
<Style Selector="^:light /template/ PathIcon#PART_Icon"> <Style Selector="^:light /template/ PathIcon#PART_Icon">
<Setter Property="Data" Value="{DynamicResource ThemeSelectorButtonLightGlyph}"></Setter> <Setter Property="Data" Value="{DynamicResource ThemeSelectorButtonLightGlyph}" />
<Setter Property="ToolTip.Tip" Value="{DynamicResource STRING_THEME_TOGGLE_LIGHT}"></Setter> <Setter Property="ToolTip.Tip" Value="{DynamicResource STRING_THEME_TOGGLE_LIGHT}" />
</Style> </Style>
<Style Selector="^ /template/ PathIcon#PART_Icon"> <Style Selector="^ /template/ PathIcon#PART_Icon">
<Setter Property="Data" Value="{DynamicResource ThemeSelectorButtonDefaultGlyph}"></Setter> <Setter Property="Data" Value="{DynamicResource ThemeSelectorButtonDefaultGlyph}" />
<Setter Property="ToolTip.Tip" Value="{DynamicResource STRING_THEME_TOGGLE_SYSTEM}"></Setter> <Setter Property="ToolTip.Tip" Value="{DynamicResource STRING_THEME_TOGGLE_SYSTEM}" />
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -150,7 +150,7 @@
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
<Style Selector="^:focus-within"> <Style Selector="^:focus-within">
<Setter Property="Border.BorderBrush" Value="{DynamicResource TextBoxFocusBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource TextBoxFocusBorderBrush}" />
</Style> </Style>
<Style Selector="^:disabled"> <Style Selector="^:disabled">
<Setter Property="Background" Value="{DynamicResource TextBoxDisabledBackground}" /> <Setter Property="Background" Value="{DynamicResource TextBoxDisabledBackground}" />

View File

@@ -133,8 +133,7 @@
InnerRightContent="{TemplateBinding InnerRightContent}" InnerRightContent="{TemplateBinding InnerRightContent}"
IsReadOnly="{TemplateBinding IsReadonly}" IsReadOnly="{TemplateBinding IsReadonly}"
Theme="{DynamicResource LooklessTextBox}" Theme="{DynamicResource LooklessTextBox}"
Watermark="{TemplateBinding Watermark}"> Watermark="{TemplateBinding Watermark}" />
</TextBox>
<Button <Button
Name="ClearButton" Name="ClearButton"
Grid.Column="1" Grid.Column="1"

View File

@@ -34,7 +34,7 @@
<ControlTheme x:Key="{x:Type u:TimelineItem}" TargetType="u:TimelineItem"> <ControlTheme x:Key="{x:Type u:TimelineItem}" TargetType="u:TimelineItem">
<Setter Property="HorizontalAlignment" Value="Left" /> <Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Top" /> <Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="u:TimelineItem.Template"> <Setter Property="Template">
<ControlTemplate TargetType="u:TimelineItem"> <ControlTemplate TargetType="u:TimelineItem">
<Grid <Grid
Name="PART_RootGrid" Name="PART_RootGrid"
@@ -148,7 +148,7 @@
<Setter Property="Grid.Column" Value="2" /> <Setter Property="Grid.Column" Value="2" />
<Setter Property="TextAlignment" Value="Left" /> <Setter Property="TextAlignment" Value="Left" />
<Setter Property="HorizontalAlignment" Value="Left" /> <Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="Margin" Value="8 2 8 12"></Setter> <Setter Property="Margin" Value="8 2 8 12" />
</Style> </Style>
</Style> </Style>
<Style Selector="^:all-right"> <Style Selector="^:all-right">
@@ -169,7 +169,7 @@
<Setter Property="Grid.Column" Value="0" /> <Setter Property="Grid.Column" Value="0" />
<Setter Property="TextAlignment" Value="Right" /> <Setter Property="TextAlignment" Value="Right" />
<Setter Property="HorizontalAlignment" Value="Right" /> <Setter Property="HorizontalAlignment" Value="Right" />
<Setter Property="Margin" Value="8 2 8 12"></Setter> <Setter Property="Margin" Value="8 2 8 12" />
</Style> </Style>
</Style> </Style>
<Style Selector="^:separate"> <Style Selector="^:separate">
@@ -184,7 +184,7 @@
<Setter Property="Grid.Column" Value="2" /> <Setter Property="Grid.Column" Value="2" />
<Setter Property="HorizontalContentAlignment" Value="Left" /> <Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="HorizontalAlignment" Value="Left" /> <Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="Margin" Value="8 2 8 12"></Setter> <Setter Property="Margin" Value="8 2 8 12" />
</Style> </Style>
<Style Selector="^ /template/ TextBlock#PART_Time"> <Style Selector="^ /template/ TextBlock#PART_Time">
<Setter Property="Grid.Row" Value="0" /> <Setter Property="Grid.Row" Value="0" />

View File

@@ -269,7 +269,7 @@
<Style Selector="^ /template/ Border#PART_LayoutRoot:pointerover"> <Style Selector="^ /template/ Border#PART_LayoutRoot:pointerover">
<Setter Property="Background" Value="{DynamicResource TreeViewItemPointeroverBackground}" /> <Setter Property="Background" Value="{DynamicResource TreeViewItemPointeroverBackground}" />
</Style> </Style>
<!-- Pressed state --> <!-- Pressed state -->
<Style Selector="^:pressed /template/ Border#PART_LayoutRoot:pointerover"> <Style Selector="^:pressed /template/ Border#PART_LayoutRoot:pointerover">
<Setter Property="Background" Value="{DynamicResource TreeViewItemPressedBackground}" /> <Setter Property="Background" Value="{DynamicResource TreeViewItemPressedBackground}" />

View File

@@ -1,6 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- Add Resources Here --> <!-- Add Resources Here -->
<SolidColorBrush x:Key="ClosableTagBackground" Opacity="0.15" Color="#888D92" /> <SolidColorBrush x:Key="ClosableTagBackground" Opacity="0.15" Color="#888D92" />
<SolidColorBrush x:Key="ClosableTagForeground" Color="#E6E8EA"/> <SolidColorBrush x:Key="ClosableTagForeground" Color="#E6E8EA" />
<SolidColorBrush x:Key="ClosableTagBorder" Opacity="0.08" Color="White"/> <SolidColorBrush x:Key="ClosableTagBorder" Opacity="0.08" Color="White" />
</ResourceDictionary> </ResourceDictionary>