diff --git a/Ursa.sln b/Ursa.sln
index 695f774..524363d 100644
--- a/Ursa.sln
+++ b/Ursa.sln
@@ -42,8 +42,8 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GitHub Action", "GitHub Action", "{66123AC1-7C8C-4AA0-BBDB-5CC3E647A741}"
ProjectSection(SolutionItems) = preProject
.github\workflows\deploy.yml = .github\workflows\deploy.yml
- .github\workflows\pack.yml = .github\workflows\pack.yml
.github\workflows\pack-nightly.yml = .github\workflows\pack-nightly.yml
+ .github\workflows\pack.yml = .github\workflows\pack.yml
.github\workflows\publish.yml = .github\workflows\publish.yml
.github\workflows\release-tag.yml = .github\workflows\release-tag.yml
.github\workflows\test.yml = .github\workflows\test.yml
@@ -69,6 +69,7 @@ Global
{53B5F277-3AEB-4661-ACAE-15CFFF2ED800}.Release|Any CPU.Build.0 = Release|Any CPU
{3FC76CD9-CE5D-4804-A8D6-4E292EB296AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3FC76CD9-CE5D-4804-A8D6-4E292EB296AA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3FC76CD9-CE5D-4804-A8D6-4E292EB296AA}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{3FC76CD9-CE5D-4804-A8D6-4E292EB296AA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3FC76CD9-CE5D-4804-A8D6-4E292EB296AA}.Release|Any CPU.Build.0 = Release|Any CPU
{B6BAB821-A9FE-44F3-B9CD-06E27FDB63F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
diff --git a/demo/Ursa.Demo/Pages/AnchorDemo.axaml b/demo/Ursa.Demo/Pages/AnchorDemo.axaml
new file mode 100644
index 0000000..9f4c56b
--- /dev/null
+++ b/demo/Ursa.Demo/Pages/AnchorDemo.axaml
@@ -0,0 +1,265 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/demo/Ursa.Demo/Pages/AnchorDemo.axaml.cs b/demo/Ursa.Demo/Pages/AnchorDemo.axaml.cs
new file mode 100644
index 0000000..584f821
--- /dev/null
+++ b/demo/Ursa.Demo/Pages/AnchorDemo.axaml.cs
@@ -0,0 +1,13 @@
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Markup.Xaml;
+
+namespace Ursa.Demo.Pages;
+
+public partial class AnchorDemo : UserControl
+{
+ public AnchorDemo()
+ {
+ InitializeComponent();
+ }
+}
\ No newline at end of file
diff --git a/demo/Ursa.Demo/ViewModels/AnchorDemoViewModel.cs b/demo/Ursa.Demo/ViewModels/AnchorDemoViewModel.cs
new file mode 100644
index 0000000..e5a4d05
--- /dev/null
+++ b/demo/Ursa.Demo/ViewModels/AnchorDemoViewModel.cs
@@ -0,0 +1,44 @@
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using CommunityToolkit.Mvvm.ComponentModel;
+
+namespace Ursa.Demo.ViewModels;
+
+public partial class AnchorDemoViewModel : ObservableObject
+{
+ public List AnchorItems { get; } = new()
+ {
+ new AnchorItemViewModel { AnchorId = "anchor1", Header = "Anchor 1" },
+ new AnchorItemViewModel { AnchorId = "anchor2", Header = "Anchor 2" },
+ new AnchorItemViewModel
+ {
+ AnchorId = "anchor3", Header = "Anchor 3",
+ Children =
+ [
+ new AnchorItemViewModel() { AnchorId = "anchor3-1", Header = "Anchor 3.1" },
+ new AnchorItemViewModel()
+ {
+ AnchorId = "anchor3-2", Header = "Anchor 3.2",
+ Children =
+ [
+ new AnchorItemViewModel() { AnchorId = "anchor3-2-1", Header = "Anchor 3.2.1" },
+ new AnchorItemViewModel() { AnchorId = "anchor3-2-2", Header = "Anchor 3.2.2" },
+ new AnchorItemViewModel() { AnchorId = "anchor3-2-3", Header = "Anchor 3.2.3" }
+ ]
+ },
+ new AnchorItemViewModel() { AnchorId = "anchor3-3", Header = "Anchor 3.3" }
+ ]
+ },
+ new AnchorItemViewModel { AnchorId = "anchor4", Header = "Anchor 4" },
+ new AnchorItemViewModel { AnchorId = "anchor5", Header = "Anchor 5" },
+ new AnchorItemViewModel { AnchorId = "anchor6", Header = "Anchor 6" },
+ new AnchorItemViewModel { AnchorId = "anchor7", Header = "Anchor 7" },
+ };
+}
+
+public partial class AnchorItemViewModel : ObservableObject
+{
+ [ObservableProperty] private string? _anchorId;
+ [ObservableProperty] private string? _header;
+ public ObservableCollection? Children { get; set; }
+}
\ No newline at end of file
diff --git a/demo/Ursa.Demo/ViewModels/MainViewViewModel.cs b/demo/Ursa.Demo/ViewModels/MainViewViewModel.cs
index 361b236..5f1ba3e 100644
--- a/demo/Ursa.Demo/ViewModels/MainViewViewModel.cs
+++ b/demo/Ursa.Demo/ViewModels/MainViewViewModel.cs
@@ -86,8 +86,9 @@ public partial class MainViewViewModel : ViewModelBase
MenuKeys.MenuKeyToolBar => new ToolBarDemoViewModel(),
MenuKeys.MenuKeyTreeComboBox => new TreeComboBoxDemoViewModel(),
MenuKeys.MenuKeyTwoTonePathIcon => new TwoTonePathIconDemoViewModel(),
- MenuKeys.AspectRatioLayout => new AspectRatioLayoutDemoViewModel(),
- MenuKeys.PathPicker => new PathPickerDemoViewModel(),
+ MenuKeys.MenuKeyAspectRatioLayout => new AspectRatioLayoutDemoViewModel(),
+ MenuKeys.MenuKeyPathPicker => new PathPickerDemoViewModel(),
+ MenuKeys.MenuKeyAnchor => new AnchorDemoViewModel(),
_ => throw new ArgumentOutOfRangeException(nameof(s), s, null)
};
}
diff --git a/demo/Ursa.Demo/ViewModels/MenuViewModel.cs b/demo/Ursa.Demo/ViewModels/MenuViewModel.cs
index 14f4e60..297822b 100644
--- a/demo/Ursa.Demo/ViewModels/MenuViewModel.cs
+++ b/demo/Ursa.Demo/ViewModels/MenuViewModel.cs
@@ -26,7 +26,7 @@ public class MenuViewModel : ViewModelBase
new() { MenuHeader = "MultiComboBox", Key = MenuKeys.MenuKeyMultiComboBox },
new() { MenuHeader = "Numeric UpDown", Key = MenuKeys.MenuKeyNumericUpDown },
new() { MenuHeader = "NumPad", Key = MenuKeys.MenuKeyNumPad },
- new() { MenuHeader = "PathPicker", Key = MenuKeys.PathPicker, Status = "New" },
+ new() { MenuHeader = "PathPicker", Key = MenuKeys.MenuKeyPathPicker, Status = "New" },
new() { MenuHeader = "PinCode", Key = MenuKeys.MenuKeyPinCode },
new() { MenuHeader = "RangeSlider", Key = MenuKeys.MenuKeyRangeSlider },
new() { MenuHeader = "Rating", Key = MenuKeys.MenuKeyRating },
@@ -67,6 +67,7 @@ public class MenuViewModel : ViewModelBase
{
MenuHeader = "Navigation & Menus", Children = new ObservableCollection
{
+ new() { MenuHeader = "Anchor", Key = MenuKeys.MenuKeyAnchor, Status = "New" },
new() { MenuHeader = "Breadcrumb", Key = MenuKeys.MenuKeyBreadcrumb, Status = "Updated" },
new() { MenuHeader = "Nav Menu", Key = MenuKeys.MenuKeyNavMenu, Status = "Updated" },
new() { MenuHeader = "Pagination", Key = MenuKeys.MenuKeyPagination },
@@ -78,7 +79,7 @@ public class MenuViewModel : ViewModelBase
MenuHeader = "Layout & Display",
Children = new ObservableCollection
{
- new() { MenuHeader = "AspectRatioLayout", Key = MenuKeys.AspectRatioLayout },
+ new() { MenuHeader = "AspectRatioLayout", Key = MenuKeys.MenuKeyAspectRatioLayout },
new() { MenuHeader = "Avatar", Key = MenuKeys.MenuKeyAvatar, Status = "WIP" },
new() { MenuHeader = "Badge", Key = MenuKeys.MenuKeyBadge },
new() { MenuHeader = "Banner", Key = MenuKeys.MenuKeyBanner, Status = "Updated" },
@@ -154,6 +155,7 @@ public static class MenuKeys
public const string MenuKeyToolBar = "ToolBar";
public const string MenuKeyTreeComboBox = "TreeComboBox";
public const string MenuKeyTwoTonePathIcon = "TwoTonePathIcon";
- public const string AspectRatioLayout = "AspectRatioLayout";
- public const string PathPicker = "PathPicker";
+ public const string MenuKeyAspectRatioLayout = "AspectRatioLayout";
+ public const string MenuKeyPathPicker = "PathPicker";
+ public const string MenuKeyAnchor = "Anchor";
}
\ No newline at end of file
diff --git a/src/Ursa.Themes.Semi/Controls/Anchor.axaml b/src/Ursa.Themes.Semi/Controls/Anchor.axaml
new file mode 100644
index 0000000..87d292e
--- /dev/null
+++ b/src/Ursa.Themes.Semi/Controls/Anchor.axaml
@@ -0,0 +1,91 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Ursa.Themes.Semi/Controls/_index.axaml b/src/Ursa.Themes.Semi/Controls/_index.axaml
index ff8b078..b2672a9 100644
--- a/src/Ursa.Themes.Semi/Controls/_index.axaml
+++ b/src/Ursa.Themes.Semi/Controls/_index.axaml
@@ -1,5 +1,6 @@
+
diff --git a/src/Ursa.Themes.Semi/Converters/NavigationMenuItemLevelToMarginConverter.cs b/src/Ursa.Themes.Semi/Converters/NavigationMenuItemLevelToMarginConverter.cs
deleted file mode 100644
index bcacb57..0000000
--- a/src/Ursa.Themes.Semi/Converters/NavigationMenuItemLevelToMarginConverter.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using System.Globalization;
-using Avalonia;
-using Avalonia.Data.Converters;
-
-namespace Ursa.Themes.Semi.Converters;
-
-public class NavigationMenuItemLevelToMarginConverter: IMultiValueConverter
-{
- public int Indent { get; set; }
-
- public object? Convert(IList