From 4f3dd98c68c3f7f337951f2373db4b7907acbc26 Mon Sep 17 00:00:00 2001 From: rabbitism Date: Sun, 17 Mar 2024 23:57:09 +0800 Subject: [PATCH 1/2] feat: add more names. --- src/Irihi.Avalonia.Shared/AssemblyInfo.cs | 1 + src/Irihi.Avalonia.Shared/Common/PartNames.cs | 20 +++++++++++ .../Common/PseudoClasses.cs | 35 +++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 src/Irihi.Avalonia.Shared/Common/PartNames.cs create mode 100644 src/Irihi.Avalonia.Shared/Common/PseudoClasses.cs diff --git a/src/Irihi.Avalonia.Shared/AssemblyInfo.cs b/src/Irihi.Avalonia.Shared/AssemblyInfo.cs index daec771..e6411d5 100644 --- a/src/Irihi.Avalonia.Shared/AssemblyInfo.cs +++ b/src/Irihi.Avalonia.Shared/AssemblyInfo.cs @@ -1,6 +1,7 @@ using Avalonia.Metadata; [assembly:XmlnsPrefix("https://irihi.tech/shared", "iri")] +[assembly:XmlnsDefinition("https://irihi.tech/shared", "Irihi.Avalonia.Shared.Common")] [assembly:XmlnsDefinition("https://irihi.tech/shared", "Irihi.Avalonia.Shared.Contracts")] [assembly:XmlnsDefinition("https://irihi.tech/shared", "Irihi.Avalonia.Shared.Property")] [assembly:XmlnsDefinition("https://irihi.tech/shared", "Irihi.Avalonia.Shared.MarkupExtensions")] diff --git a/src/Irihi.Avalonia.Shared/Common/PartNames.cs b/src/Irihi.Avalonia.Shared/Common/PartNames.cs new file mode 100644 index 0000000..10746b3 --- /dev/null +++ b/src/Irihi.Avalonia.Shared/Common/PartNames.cs @@ -0,0 +1,20 @@ +namespace Irihi.Avalonia.Shared.Common; + +public static class PartNames +{ + public const string PART_ContentPresenter = "PART_ContentPresenter"; + public const string PART_HeaderPresenter = "PART_HeaderPresenter"; + public const string PART_ItemsPresenter = "PART_ItemsPresenter"; + public const string PART_IconsPresenter = "PART_IconsPresenter"; + public const string PART_Popup = "PART_Popup"; + public const string PART_Flyout = "PART_Flyout"; + public const string PART_Header = "PART_Header"; + public const string PART_Content = "PART_Content"; + public const string PART_OverflowPanel = "PART_OverflowPanel"; + public const string PART_ItemsControl = "PART_ItemsControl"; + public const string PART_CloseButton = "PART_CloseButton"; + public const string PART_Icon = "PART_Icon"; + public const string PART_BackgroundBorder = "PART_BackgroundBorder"; + public const string PART_FocusElement = "PART_FocusElement"; + +} \ No newline at end of file diff --git a/src/Irihi.Avalonia.Shared/Common/PseudoClasses.cs b/src/Irihi.Avalonia.Shared/Common/PseudoClasses.cs new file mode 100644 index 0000000..486f4d6 --- /dev/null +++ b/src/Irihi.Avalonia.Shared/Common/PseudoClasses.cs @@ -0,0 +1,35 @@ +namespace Irihi.Avalonia.Shared.Common; + +public static class PseudoClasses +{ + public const string PC_Disabled = ":disabled"; + public const string PC_Pointerover = ":pointerover"; + public const string PC_Pressed = ":pressed"; + public const string PC_Focus = ":focus"; + public const string PC_FocusWithin = ":focus-within"; + public const string PC_Horizontal = ":horizontal"; + public const string PC_Vertical = ":vertical"; + public const string PC_Selected = ":selected"; + public const string PC_Checked = ":checked"; + public const string PC_Active = ":active"; + public const string PC_Indeterminate = ":indeterminate"; + + #region Positions + + public const string PC_Top = ":top"; + public const string PC_Bottom = ":bottom"; + public const string PC_Right = ":right"; + public const string PC_Left = ":left"; + + #endregion + + #region Collection + + public const string PC_First = ":first"; + public const string PC_Last = ":last"; + public const string PC_Empty = ":empty"; + + #endregion + + +} \ No newline at end of file From 1964eea98b239cef2ac62f311b4497f59d46f68b Mon Sep 17 00:00:00 2001 From: rabbitism Date: Mon, 18 Mar 2024 00:07:56 +0800 Subject: [PATCH 2/2] feat: add thumb. --- src/Irihi.Avalonia.Shared/Common/PartNames.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Irihi.Avalonia.Shared/Common/PartNames.cs b/src/Irihi.Avalonia.Shared/Common/PartNames.cs index 10746b3..08bb93e 100644 --- a/src/Irihi.Avalonia.Shared/Common/PartNames.cs +++ b/src/Irihi.Avalonia.Shared/Common/PartNames.cs @@ -16,5 +16,6 @@ public static class PartNames public const string PART_Icon = "PART_Icon"; public const string PART_BackgroundBorder = "PART_BackgroundBorder"; public const string PART_FocusElement = "PART_FocusElement"; + public const string PART_Thumb = "PART_Thumb"; } \ No newline at end of file