diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 9ee4649a..1973f6e0 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -2,12 +2,12 @@ name: Deploy to GitHub Pages
env:
PROJECT_PATH: demo/Ursa.Demo.Browser/Ursa.Demo.Browser.csproj
- OUTPUT_PATH: demo/Ursa.Demo.Browser/bin/Release/net7.0/browser-wasm/AppBundle
+ OUTPUT_PATH: demo/Ursa.Demo.Browser/bin/Release/net8.0-browser/publish/wwwroot
on:
push:
- branches: [ "deploy" ]
+ branches: [ "action/deploy" ]
pull_request:
- branches: [ "deploy" ]
+ branches: [ "action/deploy" ]
jobs:
deploy-to-github-pages:
@@ -16,19 +16,16 @@ jobs:
- name: Checkout
uses: actions/checkout@v4.1.1
- - name: Setup .NET 7
+ - name: Setup .NET 8
uses: actions/setup-dotnet@v4
with:
- dotnet-version: 7.0.405
+ dotnet-version: 8.0.x
- name: Install wasm-tools
- run: dotnet workload install wasm-tools wasm-tools-net7
-
- - name: Install DotNetCompress
- run: dotnet tool install --global DotNetCompress --version 3.0.0 --no-cache
+ run: dotnet workload install wasm-tools
- name: Publish .NET Project
- run: dotnet publish $PROJECT_PATH -c Release -o release --nologo
+ run: dotnet publish $PROJECT_PATH -c Release --nologo
- name: Change base-tag in index.html
run: sed -i 's///g' $OUTPUT_PATH/index.html
@@ -36,12 +33,6 @@ jobs:
- name: copy index.html to 404.html
run: cp $OUTPUT_PATH/index.html $OUTPUT_PATH/404.html
- - name: Compress Output using Brotli
- run: DotNetCompress -d $OUTPUT_PATH -p "*.dll" "*.js" "*.wasm" --format br --threads 4
-
- - name: Compress Output using GZip
- run: DotNetCompress -d $OUTPUT_PATH -p "*.dll" "*.js" "*.wasm" --format gz --threads 4
-
- name: Add .nojekyll file
run: touch $OUTPUT_PATH/.nojekyll
diff --git a/.github/workflows/pack.yml b/.github/workflows/pack.yml
new file mode 100644
index 00000000..59889275
--- /dev/null
+++ b/.github/workflows/pack.yml
@@ -0,0 +1,52 @@
+name: Pack
+
+on:
+ push:
+ branches: [ "action/pack" ]
+ pull_request:
+ branches: [ "action/pack" ]
+
+jobs:
+ nuget_desktop:
+ runs-on: windows-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4.1.1
+
+ - name: Nuget Ursa
+ run: dotnet pack ./src/Ursa -o ./nugets
+
+ - name: Nuget Ursa.Themes.Semi
+ run: dotnet pack ./src/Ursa.Themes.Semi -o ./nugets
+
+ - name: Desktop
+ run: dotnet publish ./demo/Ursa.Demo.Desktop -r win-x64 -c Release /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true --self-contained true
+
+ - name: Upload a Build Artifact
+ uses: actions/upload-artifact@v4.3.1
+ with:
+ name: nuget_desktop
+ path: |
+ ./nugets
+ ./**/publish/*.exe
+
+ android:
+ runs-on: windows-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4.1.1
+
+ - name: CD Android
+ run: cd ./demo/Ursa.Demo.Android
+
+ - name: Restore Dependencies
+ run: dotnet restore
+
+ - name: Build
+ run: dotnet publish ./demo/Ursa.Demo.Android -c Release -f net8.0-android --no-restore
+
+ - name: Upload a Build Artifact
+ uses: actions/upload-artifact@v4.3.1
+ with:
+ name: android
+ path: ./**/publish/*Signed.apk
diff --git a/README.md b/README.md
index 3950ab05..dced897b 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@ Ursa is a UI library for building cross-platform UIs with Avalonia UI.
Add nuget package:
```bash
-dotnet add package Irihi.Ursa --version 0.2.0-beta20240129
+dotnet add package Irihi.Ursa
```
You can now use Ursa controls in your Avalonia Application.
@@ -42,7 +42,7 @@ Ursa.Themes.Semi is a theme package for Ursa inspired by Semi Design. You can ad
Add nuget package:
```bash
dotnet add package Semi.Avalonia --version 11.0.7
-dotnet add package Irihi.Ursa.Themes.Semi --version 0.2.0-beta20240129
+dotnet add package Irihi.Ursa.Themes.Semi
```
Include Styles in application:
@@ -56,3 +56,9 @@ Include Styles in application:
```
+
+## Support
+
+We offer limited free community support for Semi Avalonia and Ursa. Please join our group via FeiShu(Lark)
+
+![Support](./assets/community-support.png)
\ No newline at end of file
diff --git a/Ursa.sln b/Ursa.sln
index d46008b8..a7328fd6 100644
--- a/Ursa.sln
+++ b/Ursa.sln
@@ -20,6 +20,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ursa.PrismExtension", "src\
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ursa.PrismDialogDemo", "demo\Ursa.PrismDialogDemo\Ursa.PrismDialogDemo.csproj", "{F99B3D07-4560-4B05-892C-0FF2757FEF2E}"
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Files", "Solution Files", "{9D34CC2C-9BFA-4138-BA5A-CD3744F9B589}"
+ ProjectSection(SolutionItems) = preProject
+ src\Package.props = src\Package.props
+ demo\Directory.Build.props = demo\Directory.Build.props
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
diff --git a/assets/community-support.png b/assets/community-support.png
new file mode 100644
index 00000000..fa4206c0
Binary files /dev/null and b/assets/community-support.png differ
diff --git a/demo/Directory.Build.props b/demo/Directory.Build.props
index c950d6ac..4832db98 100644
--- a/demo/Directory.Build.props
+++ b/demo/Directory.Build.props
@@ -1,6 +1,6 @@
enable
- 11.0.9
+ 11.1.0-rc2
diff --git a/demo/Ursa.Demo.Android/Ursa.Demo.Android.csproj b/demo/Ursa.Demo.Android/Ursa.Demo.Android.csproj
index 4071d05e..f5730c19 100644
--- a/demo/Ursa.Demo.Android/Ursa.Demo.Android.csproj
+++ b/demo/Ursa.Demo.Android/Ursa.Demo.Android.csproj
@@ -1,7 +1,7 @@
Exe
- net7.0-android
+ net8.0-android
21
enable
com.irihitech.Ursa
diff --git a/demo/Ursa.Demo.Browser/Program.cs b/demo/Ursa.Demo.Browser/Program.cs
index 4fa71621..f6656416 100644
--- a/demo/Ursa.Demo.Browser/Program.cs
+++ b/demo/Ursa.Demo.Browser/Program.cs
@@ -7,9 +7,9 @@
namespace Ursa.Demo.Browser;
-internal partial class Program
+internal sealed partial class Program
{
- private static async Task Main(string[] args) => await BuildAvaloniaApp()
+ private static Task Main(string[] args) => BuildAvaloniaApp()
.StartBrowserAppAsync("out");
public static AppBuilder BuildAvaloniaApp()
diff --git a/demo/Ursa.Demo.Browser/Ursa.Demo.Browser.csproj b/demo/Ursa.Demo.Browser/Ursa.Demo.Browser.csproj
index f51b5fbc..0b2c8c45 100644
--- a/demo/Ursa.Demo.Browser/Ursa.Demo.Browser.csproj
+++ b/demo/Ursa.Demo.Browser/Ursa.Demo.Browser.csproj
@@ -1,20 +1,18 @@
-
+
- net7.0
- browser-wasm
- AppBundle\main.js
Exe
+ net8.0-browser
-
+
-
+
-
+
diff --git a/demo/Ursa.Demo.Browser/linker.xml b/demo/Ursa.Demo.Browser/linker.xml
new file mode 100644
index 00000000..1b96c2ac
--- /dev/null
+++ b/demo/Ursa.Demo.Browser/linker.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/demo/Ursa.Demo.Browser/AppBundle/Logo.svg b/demo/Ursa.Demo.Browser/wwwroot/Logo.svg
similarity index 100%
rename from demo/Ursa.Demo.Browser/AppBundle/Logo.svg
rename to demo/Ursa.Demo.Browser/wwwroot/Logo.svg
diff --git a/demo/Ursa.Demo.Browser/AppBundle/app.css b/demo/Ursa.Demo.Browser/wwwroot/app.css
similarity index 100%
rename from demo/Ursa.Demo.Browser/AppBundle/app.css
rename to demo/Ursa.Demo.Browser/wwwroot/app.css
diff --git a/demo/Ursa.Demo.Browser/AppBundle/favicon.ico b/demo/Ursa.Demo.Browser/wwwroot/favicon.ico
similarity index 100%
rename from demo/Ursa.Demo.Browser/AppBundle/favicon.ico
rename to demo/Ursa.Demo.Browser/wwwroot/favicon.ico
diff --git a/demo/Ursa.Demo.Browser/AppBundle/index.html b/demo/Ursa.Demo.Browser/wwwroot/index.html
similarity index 86%
rename from demo/Ursa.Demo.Browser/AppBundle/index.html
rename to demo/Ursa.Demo.Browser/wwwroot/index.html
index 184f7caf..1c9e22f9 100644
--- a/demo/Ursa.Demo.Browser/AppBundle/index.html
+++ b/demo/Ursa.Demo.Browser/wwwroot/index.html
@@ -7,8 +7,8 @@
-
-
+
+
diff --git a/demo/Ursa.Demo.Browser/AppBundle/main.js b/demo/Ursa.Demo.Browser/wwwroot/main.js
similarity index 69%
rename from demo/Ursa.Demo.Browser/AppBundle/main.js
rename to demo/Ursa.Demo.Browser/wwwroot/main.js
index 0dbe2e45..2af82e9b 100644
--- a/demo/Ursa.Demo.Browser/AppBundle/main.js
+++ b/demo/Ursa.Demo.Browser/wwwroot/main.js
@@ -1,4 +1,4 @@
-import { dotnet } from './dotnet.js'
+import { dotnet } from './_framework/dotnet.js'
const is_browser = typeof window != "undefined";
if (!is_browser) throw new Error(`Expected to be running in a browser`);
@@ -10,4 +10,4 @@ const dotnetRuntime = await dotnet
const config = dotnetRuntime.getConfig();
-await dotnetRuntime.runMainAndExit(config.mainAssemblyName, [window.location.search]);
\ No newline at end of file
+await dotnetRuntime.runMain(config.mainAssemblyName, [window.location.search]);
\ No newline at end of file
diff --git a/demo/Ursa.Demo.Desktop/Ursa.Demo.Desktop.csproj b/demo/Ursa.Demo.Desktop/Ursa.Demo.Desktop.csproj
index 64e44cec..6566753f 100644
--- a/demo/Ursa.Demo.Desktop/Ursa.Demo.Desktop.csproj
+++ b/demo/Ursa.Demo.Desktop/Ursa.Demo.Desktop.csproj
@@ -3,7 +3,7 @@
WinExe
- net7.0
+ net8.0
enable
true
false
diff --git a/demo/Ursa.Demo.iOS/Ursa.Demo.iOS.csproj b/demo/Ursa.Demo.iOS/Ursa.Demo.iOS.csproj
index 5f70ccb3..65fad79e 100644
--- a/demo/Ursa.Demo.iOS/Ursa.Demo.iOS.csproj
+++ b/demo/Ursa.Demo.iOS/Ursa.Demo.iOS.csproj
@@ -1,7 +1,7 @@
Exe
- net6.0-ios
+ net8.0-ios
13.0
enable
diff --git a/demo/Ursa.Demo/App.axaml.cs b/demo/Ursa.Demo/App.axaml.cs
index 169a1161..1b2ba8ae 100644
--- a/demo/Ursa.Demo/App.axaml.cs
+++ b/demo/Ursa.Demo/App.axaml.cs
@@ -24,7 +24,7 @@ public override void OnFrameworkInitializationCompleted()
}
else if (ApplicationLifetime is ISingleViewApplicationLifetime singleView)
{
- singleView.MainView = new MainView()
+ singleView.MainView = new SingleView()
{
DataContext = new MainViewViewModel(),
};
diff --git a/demo/Ursa.Demo/Assets/3x.png b/demo/Ursa.Demo/Assets/3x.png
new file mode 100644
index 00000000..6dd5bf10
Binary files /dev/null and b/demo/Ursa.Demo/Assets/3x.png differ
diff --git a/demo/Ursa.Demo/Converters/IconNameConverter.cs b/demo/Ursa.Demo/Converters/IconNameConverter.cs
index 309a0e87..4d1fe998 100644
--- a/demo/Ursa.Demo/Converters/IconNameConverter.cs
+++ b/demo/Ursa.Demo/Converters/IconNameConverter.cs
@@ -13,7 +13,7 @@ namespace Ursa.Demo.Converters;
public class IconNameConverter: IValueConverter
{
[Content]
- public Dictionary Paths { get; set; } = new();
+ public Dictionary Paths { get; set; } = new();
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
diff --git a/demo/Ursa.Demo/Dialogs/PlainDialog.axaml b/demo/Ursa.Demo/Dialogs/PlainDialog.axaml
index 89dbb0dd..8543273d 100644
--- a/demo/Ursa.Demo/Dialogs/PlainDialog.axaml
+++ b/demo/Ursa.Demo/Dialogs/PlainDialog.axaml
@@ -9,5 +9,6 @@
x:Class="Ursa.Demo.Dialogs.PlainDialog">
+
diff --git a/demo/Ursa.Demo/Dialogs/PlainDialogViewModel.cs b/demo/Ursa.Demo/Dialogs/PlainDialogViewModel.cs
index 2e199a6f..b1058c1b 100644
--- a/demo/Ursa.Demo/Dialogs/PlainDialogViewModel.cs
+++ b/demo/Ursa.Demo/Dialogs/PlainDialogViewModel.cs
@@ -12,4 +12,16 @@ public DateTime? Date
get => _date;
set => SetProperty(ref _date, value);
}
-}
\ No newline at end of file
+
+ private string? _text;
+ public string? Text
+ {
+ get => _text;
+ set => SetProperty(ref _text, value);
+ }
+
+ public PlainDialogViewModel()
+ {
+ Text = "I am PlainDialogViewModel!";
+ }
+}
diff --git a/demo/Ursa.Demo/Models/MenuKeys.cs b/demo/Ursa.Demo/Models/MenuKeys.cs
index 085be94d..e69de29b 100644
--- a/demo/Ursa.Demo/Models/MenuKeys.cs
+++ b/demo/Ursa.Demo/Models/MenuKeys.cs
@@ -1,36 +0,0 @@
-namespace Ursa.Demo;
-
-public static class MenuKeys
-{
- public const string MenuKeyIntroduction = "Introduction";
- public const string MenuKeyBadge = "Badge";
- public const string MenuKeyBanner = "Banner";
- public const string MenuKeyButtonGroup = "ButtonGroup";
- public const string MenuKeyClassInput = "Class Input";
- public const string MenuKeyDialog = "Dialog";
- public const string MenuKeyDivider = "Divider";
- public const string MenuKeyDisableContainer = "DisableContainer";
- public const string MenuKeyDrawer = "Drawer";
- public const string MenuKeyDualBadge = "DualBadge";
- public const string MenuKeyEnumSelector = "EnumSelector";
- public const string MenuKeyForm = "Form";
- public const string MenuKeyImageViewer = "ImageViewer";
- public const string MenuKeyIpBox = "IPv4Box";
- public const string MenuKeyIconButton = "IconButton";
- public const string MenuKeyKeyGestureInput = "KeyGestureInput";
- public const string MenuKeyLoading = "Loading";
- public const string MenuKeyMessageBox = "MessageBox";
- public const string MenuKeyNavMenu = "NavMenu";
- public const string MenuKeyNumberDisplayer = "NumberDisplayer";
- public const string MenuKeyNumericUpDown = "NumericUpDown";
- public const string MenuKeyPagination = "Pagination";
- public const string MenuKeyRangeSlider = "RangeSlider";
- public const string MenuKeySelectionList = "SelectionList";
- public const string MenuKeyTagInput = "TagInput";
- public const string MenuKeySkeleton = "Skeleton";
- public const string MenuKeyTimeline = "Timeline";
- public const string MenuKeyTwoTonePathIcon = "TwoTonePathIcon";
- public const string MenuKeyThemeToggler = "ThemeToggler";
- public const string MenuKeyToolBar = "ToolBar";
-
-}
\ No newline at end of file
diff --git a/demo/Ursa.Demo/Pages/AvatarDemo.axaml b/demo/Ursa.Demo/Pages/AvatarDemo.axaml
new file mode 100644
index 00000000..1a075437
--- /dev/null
+++ b/demo/Ursa.Demo/Pages/AvatarDemo.axaml
@@ -0,0 +1,96 @@
+
+
+
+
+
+ M7.44721 3.10557C7.786 2.428 8.47852 2 9.23607 2H14.7639C15.5215 2 16.214 2.428 16.5528 3.10557L17.5 5H20C21.6569 5 23 6.34315 23 8V18C23 19.6569 21.6569 21 20 21H4C2.34315 21 1 19.6569 1 18V8C1 6.34315 2.34315 5 4 5H6.5L7.44721 3.10557ZM9 13C9 11.3431 10.3431 10 12 10C13.6569 10 15 11.3431 15 13C15 14.6569 13.6569 16 12 16C10.3431 16 9 14.6569 9 13ZM12 8C9.23858 8 7 10.2386 7 13C7 15.7614 9.23858 18 12 18C14.7614 18 17 15.7614 17 13C17 10.2386 14.7614 8 12 8Z
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/demo/Ursa.Demo/Pages/AvatarDemo.axaml.cs b/demo/Ursa.Demo/Pages/AvatarDemo.axaml.cs
new file mode 100644
index 00000000..5bc2485a
--- /dev/null
+++ b/demo/Ursa.Demo/Pages/AvatarDemo.axaml.cs
@@ -0,0 +1,13 @@
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Markup.Xaml;
+
+namespace Ursa.Demo.Pages;
+
+public partial class AvatarDemo : UserControl
+{
+ public AvatarDemo()
+ {
+ InitializeComponent();
+ }
+}
\ No newline at end of file
diff --git a/demo/Ursa.Demo/Pages/BadgeDemo.axaml b/demo/Ursa.Demo/Pages/BadgeDemo.axaml
index 012ea37b..f46673b6 100644
--- a/demo/Ursa.Demo/Pages/BadgeDemo.axaml
+++ b/demo/Ursa.Demo/Pages/BadgeDemo.axaml
@@ -8,7 +8,7 @@
d:DesignHeight="850"
d:DesignWidth="850"
mc:Ignorable="d">
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/demo/Ursa.Demo/Pages/BreadcrumbDemo.axaml.cs b/demo/Ursa.Demo/Pages/BreadcrumbDemo.axaml.cs
new file mode 100644
index 00000000..c119fc7a
--- /dev/null
+++ b/demo/Ursa.Demo/Pages/BreadcrumbDemo.axaml.cs
@@ -0,0 +1,13 @@
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Markup.Xaml;
+
+namespace Ursa.Demo.Pages;
+
+public partial class BreadcrumbDemo : UserControl
+{
+ public BreadcrumbDemo()
+ {
+ InitializeComponent();
+ }
+}
\ No newline at end of file
diff --git a/demo/Ursa.Demo/Pages/ClockDemo.axaml b/demo/Ursa.Demo/Pages/ClockDemo.axaml
new file mode 100644
index 00000000..f29eff8a
--- /dev/null
+++ b/demo/Ursa.Demo/Pages/ClockDemo.axaml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
diff --git a/demo/Ursa.Demo/Pages/ClockDemo.axaml.cs b/demo/Ursa.Demo/Pages/ClockDemo.axaml.cs
new file mode 100644
index 00000000..058136a8
--- /dev/null
+++ b/demo/Ursa.Demo/Pages/ClockDemo.axaml.cs
@@ -0,0 +1,13 @@
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Markup.Xaml;
+
+namespace Ursa.Demo.Pages;
+
+public partial class ClockDemo : UserControl
+{
+ public ClockDemo()
+ {
+ InitializeComponent();
+ }
+}
\ No newline at end of file
diff --git a/demo/Ursa.Demo/Pages/DatePickerDemo.axaml b/demo/Ursa.Demo/Pages/DatePickerDemo.axaml
new file mode 100644
index 00000000..65094c14
--- /dev/null
+++ b/demo/Ursa.Demo/Pages/DatePickerDemo.axaml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
diff --git a/demo/Ursa.Demo/Pages/DatePickerDemo.axaml.cs b/demo/Ursa.Demo/Pages/DatePickerDemo.axaml.cs
new file mode 100644
index 00000000..e38d30dc
--- /dev/null
+++ b/demo/Ursa.Demo/Pages/DatePickerDemo.axaml.cs
@@ -0,0 +1,25 @@
+using System.Diagnostics;
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Markup.Xaml;
+using Ursa.Controls;
+
+namespace Ursa.Demo.Pages;
+
+public partial class DatePickerDemo : UserControl
+{
+ public DatePickerDemo()
+ {
+ InitializeComponent();
+ }
+
+ private void CalendarView_OnOnDateSelected(object? sender, CalendarDayButtonEventArgs e)
+ {
+ Debug.WriteLine("Pressed: "+ e.Date?.ToLongDateString());
+ }
+
+ private void CalendarView_OnOnDatePreviewed(object? sender, CalendarDayButtonEventArgs e)
+ {
+ Debug.WriteLine("Hovered: "+e.Date?.ToLongDateString());
+ }
+}
\ No newline at end of file
diff --git a/demo/Ursa.Demo/Pages/DialogDemo.axaml b/demo/Ursa.Demo/Pages/DialogDemo.axaml
index 1e6e67f7..8ff35344 100644
--- a/demo/Ursa.Demo/Pages/DialogDemo.axaml
+++ b/demo/Ursa.Demo/Pages/DialogDemo.axaml
@@ -34,27 +34,38 @@
IsVisible="{Binding !#overlay.IsChecked}"
OffContent="Regular"
OnContent="Modal" />
+
+
-
-
+
+
-
-
+
+
-
+
-
+
@@ -72,9 +83,15 @@
IsVisible="{Binding !#overlay2.IsChecked}"
OffContent="Local"
OnContent="Global" />
+
@@ -83,6 +100,11 @@
IsChecked="{Binding CanLightDismiss}"
OffContent="No"
OnContent="Yes" />
+
diff --git a/demo/Ursa.Demo/Pages/DualBadgeDemo.axaml b/demo/Ursa.Demo/Pages/DualBadgeDemo.axaml
index e1d85eff..f7b87ebc 100644
--- a/demo/Ursa.Demo/Pages/DualBadgeDemo.axaml
+++ b/demo/Ursa.Demo/Pages/DualBadgeDemo.axaml
@@ -10,7 +10,7 @@
mc:Ignorable="d">
- M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23ZM14 7C14 8.10457 13.1046 9 12 9C10.8954 9 10 8.10457 10 7C10 5.89543 10.8954 5 12 5C13.1046 5 14 5.89543 14 7ZM9 10.75C9 10.3358 9.33579 10 9.75 10H12.5C13.0523 10 13.5 10.4477 13.5 11V16.5H14.25C14.6642 16.5 15 16.8358 15 17.25C15 17.6642 14.6642 18 14.25 18H9.75C9.33579 18 9 17.6642 9 17.25C9 16.8358 9.33579 16.5 9.75 16.5H10.5V11.5H9.75C9.33579 11.5 9 11.1642 9 10.75Z
+ M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23ZM14 7C14 8.10457 13.1046 9 12 9C10.8954 9 10 8.10457 10 7C10 5.89543 10.8954 5 12 5C13.1046 5 14 5.89543 14 7ZM9 10.75C9 10.3358 9.33579 10 9.75 10H12.5C13.0523 10 13.5 10.4477 13.5 11V16.5H14.25C14.6642 16.5 15 16.8358 15 17.25C15 17.6642 14.6642 18 14.25 18H9.75C9.33579 18 9 17.6642 9 17.25C9 16.8358 9.33579 16.5 9.75 16.5H10.5V11.5H9.75C9.33579 11.5 9 11.1642 9 10.75Z
diff --git a/demo/Ursa.Demo/Pages/ElasticWrapPanelDemo.axaml b/demo/Ursa.Demo/Pages/ElasticWrapPanelDemo.axaml
new file mode 100644
index 00000000..10040d39
--- /dev/null
+++ b/demo/Ursa.Demo/Pages/ElasticWrapPanelDemo.axaml
@@ -0,0 +1,323 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/demo/Ursa.Demo/Pages/ElasticWrapPanelDemo.axaml.cs b/demo/Ursa.Demo/Pages/ElasticWrapPanelDemo.axaml.cs
new file mode 100644
index 00000000..f405240e
--- /dev/null
+++ b/demo/Ursa.Demo/Pages/ElasticWrapPanelDemo.axaml.cs
@@ -0,0 +1,13 @@
+using Avalonia.Controls;
+using Ursa.Demo.ViewModels;
+
+namespace Ursa.Demo.Pages;
+
+public partial class ElasticWrapPanelDemo : UserControl
+{
+ public ElasticWrapPanelDemo()
+ {
+ InitializeComponent();
+ DataContext = new ElasticWrapPanelDemoViewModel();
+ }
+}
\ No newline at end of file
diff --git a/demo/Ursa.Demo/Pages/ImageViewerDemo.axaml b/demo/Ursa.Demo/Pages/ImageViewerDemo.axaml
index 48e6266b..85db8e6e 100644
--- a/demo/Ursa.Demo/Pages/ImageViewerDemo.axaml
+++ b/demo/Ursa.Demo/Pages/ImageViewerDemo.axaml
@@ -20,8 +20,9 @@
+ Height="300"
+ MinScale="0.5"
+ Source="../Assets/3x.png">
- M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23ZM14 7C14 8.10457 13.1046 9 12 9C10.8954 9 10 8.10457 10 7C10 5.89543 10.8954 5 12 5C13.1046 5 14 5.89543 14 7ZM9 10.75C9 10.3358 9.33579 10 9.75 10H12.5C13.0523 10 13.5 10.4477 13.5 11V16.5H14.25C14.6642 16.5 15 16.8358 15 17.25C15 17.6642 14.6642 18 14.25 18H9.75C9.33579 18 9 17.6642 9 17.25C9 16.8358 9.33579 16.5 9.75 16.5H10.5V11.5H9.75C9.33579 11.5 9 11.1642 9 10.75Z
+ M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23ZM14 7C14 8.10457 13.1046 9 12 9C10.8954 9 10 8.10457 10 7C10 5.89543 10.8954 5 12 5C13.1046 5 14 5.89543 14 7ZM9 10.75C9 10.3358 9.33579 10 9.75 10H12.5C13.0523 10 13.5 10.4477 13.5 11V16.5H14.25C14.6642 16.5 15 16.8358 15 17.25C15 17.6642 14.6642 18 14.25 18H9.75C9.33579 18 9 17.6642 9 17.25C9 16.8358 9.33579 16.5 9.75 16.5H10.5V11.5H9.75C9.33579 11.5 9 11.1642 9 10.75Z
diff --git a/demo/Ursa.Demo/Pages/MultiComboBoxDemo.axaml b/demo/Ursa.Demo/Pages/MultiComboBoxDemo.axaml
new file mode 100644
index 00000000..7fe00084
--- /dev/null
+++ b/demo/Ursa.Demo/Pages/MultiComboBoxDemo.axaml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
diff --git a/demo/Ursa.Demo/Pages/MultiComboBoxDemo.axaml.cs b/demo/Ursa.Demo/Pages/MultiComboBoxDemo.axaml.cs
new file mode 100644
index 00000000..2a51be57
--- /dev/null
+++ b/demo/Ursa.Demo/Pages/MultiComboBoxDemo.axaml.cs
@@ -0,0 +1,13 @@
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Markup.Xaml;
+
+namespace Ursa.Demo.Pages;
+
+public partial class MultiComboBoxDemo : UserControl
+{
+ public MultiComboBoxDemo()
+ {
+ InitializeComponent();
+ }
+}
\ No newline at end of file
diff --git a/demo/Ursa.Demo/Pages/NavMenuDemo.axaml b/demo/Ursa.Demo/Pages/NavMenuDemo.axaml
index f1ac1cd4..885d36e4 100644
--- a/demo/Ursa.Demo/Pages/NavMenuDemo.axaml
+++ b/demo/Ursa.Demo/Pages/NavMenuDemo.axaml
@@ -38,6 +38,7 @@
Theme="{DynamicResource CardBorder}">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/demo/Ursa.Demo/Pages/NumPadDemo.axaml.cs b/demo/Ursa.Demo/Pages/NumPadDemo.axaml.cs
new file mode 100644
index 00000000..b82a6ae5
--- /dev/null
+++ b/demo/Ursa.Demo/Pages/NumPadDemo.axaml.cs
@@ -0,0 +1,14 @@
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Input;
+using Avalonia.Markup.Xaml;
+
+namespace Ursa.Demo.Pages;
+
+public partial class NumPadDemo : UserControl
+{
+ public NumPadDemo()
+ {
+ InitializeComponent();
+ }
+}
\ No newline at end of file
diff --git a/demo/Ursa.Demo/Pages/NumericUpDownDemo.axaml b/demo/Ursa.Demo/Pages/NumericUpDownDemo.axaml
index afe4496d..75baa537 100644
--- a/demo/Ursa.Demo/Pages/NumericUpDownDemo.axaml
+++ b/demo/Ursa.Demo/Pages/NumericUpDownDemo.axaml
@@ -5,22 +5,193 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:u="https://irihi.tech/ursa"
+ xmlns:vm="using:Ursa.Demo.ViewModels"
d:DesignHeight="450"
d:DesignWidth="800"
+ x:CompileBindings="True"
+ x:DataType="vm:NumericUpDownDemoViewModel"
mc:Ignorable="d">
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/demo/Ursa.Demo/Pages/NumericUpDownDemo.axaml.cs b/demo/Ursa.Demo/Pages/NumericUpDownDemo.axaml.cs
index 4bdf06d8..8ca13876 100644
--- a/demo/Ursa.Demo/Pages/NumericUpDownDemo.axaml.cs
+++ b/demo/Ursa.Demo/Pages/NumericUpDownDemo.axaml.cs
@@ -1,6 +1,9 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
+using System;
+using System.Diagnostics;
+using Ursa.Controls;
using Ursa.Demo.ViewModels;
namespace Ursa.Demo.Pages;
@@ -11,5 +14,12 @@ public NumericUpDownDemo()
{
InitializeComponent();
DataContext = new NumericUpDownDemoViewModel();
+ numd.ValueChanged += Numd_ValueChanged;
+ }
+
+ private void Numd_ValueChanged(object? sender, ValueChangedEventArgs e)
+ {
+ Trace.WriteLine($"{(sender as NumericUIntUpDown).Name} {e.OldValue} {e.NewValue}");
+
}
}
\ No newline at end of file
diff --git a/demo/Ursa.Demo/Pages/PaginationDemo.axaml b/demo/Ursa.Demo/Pages/PaginationDemo.axaml
index 00377505..77b537ef 100644
--- a/demo/Ursa.Demo/Pages/PaginationDemo.axaml
+++ b/demo/Ursa.Demo/Pages/PaginationDemo.axaml
@@ -13,12 +13,19 @@
-
+
+
+
+
+
diff --git a/demo/Ursa.Demo/Pages/RatingDemo.axaml b/demo/Ursa.Demo/Pages/RatingDemo.axaml
new file mode 100644
index 00000000..89ab51f0
--- /dev/null
+++ b/demo/Ursa.Demo/Pages/RatingDemo.axaml
@@ -0,0 +1,123 @@
+
+
+
+ M12 5.99999C10.5 2.12432 5.75193 2.0557 3.40383 4.4038C0.865423 6.94221 0.999999 10.5 3.50001 14C5.52139 16.8299 9.83088 20.3136 11.4069 21.5438C11.7573 21.8172 12.2427 21.8172 12.5931 21.5438C14.1691 20.3136 18.4786 16.8299 20.5 14C23 10.5 23.1346 6.94221 20.5962 4.4038C18.2481 2.0557 14.5 2.12432 12 5.99999Z
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/demo/Ursa.Demo/Pages/RatingDemo.axaml.cs b/demo/Ursa.Demo/Pages/RatingDemo.axaml.cs
new file mode 100644
index 00000000..8168903a
--- /dev/null
+++ b/demo/Ursa.Demo/Pages/RatingDemo.axaml.cs
@@ -0,0 +1,13 @@
+using Avalonia.Controls;
+using Ursa.Demo.ViewModels;
+
+namespace Ursa.Demo.Pages;
+
+public partial class RatingDemo : UserControl
+{
+ public RatingDemo()
+ {
+ InitializeComponent();
+ this.DataContext = new RatingDemoViewModel();
+ }
+}
\ No newline at end of file
diff --git a/demo/Ursa.Demo/Pages/ScrollToButtonDemo.axaml b/demo/Ursa.Demo/Pages/ScrollToButtonDemo.axaml
new file mode 100644
index 00000000..a7022e34
--- /dev/null
+++ b/demo/Ursa.Demo/Pages/ScrollToButtonDemo.axaml
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+ Scroll To Top
+ Scroll To Bottom
+ Scroll To Left
+ Scroll To Right
+ Scroll To Top
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/demo/Ursa.Demo/Pages/ScrollToButtonDemo.axaml.cs b/demo/Ursa.Demo/Pages/ScrollToButtonDemo.axaml.cs
new file mode 100644
index 00000000..5e7741c6
--- /dev/null
+++ b/demo/Ursa.Demo/Pages/ScrollToButtonDemo.axaml.cs
@@ -0,0 +1,13 @@
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Markup.Xaml;
+
+namespace Ursa.Demo.Pages;
+
+public partial class ScrollToButtonDemo : UserControl
+{
+ public ScrollToButtonDemo()
+ {
+ InitializeComponent();
+ }
+}
\ No newline at end of file
diff --git a/demo/Ursa.Demo/Pages/TagInputDemo.axaml b/demo/Ursa.Demo/Pages/TagInputDemo.axaml
index fc94f33a..730921cd 100644
--- a/demo/Ursa.Demo/Pages/TagInputDemo.axaml
+++ b/demo/Ursa.Demo/Pages/TagInputDemo.axaml
@@ -17,12 +17,22 @@
Margin="20"
AllowDuplicates="True"
Separator="-"
+ Watermark="Hello world"
Tags="{Binding Tags}" />
+
+
diff --git a/demo/Ursa.Demo/Pages/ThemeTogglerDemo.axaml b/demo/Ursa.Demo/Pages/ThemeTogglerDemo.axaml
index 021c2894..a4aa5b78 100644
--- a/demo/Ursa.Demo/Pages/ThemeTogglerDemo.axaml
+++ b/demo/Ursa.Demo/Pages/ThemeTogglerDemo.axaml
@@ -10,6 +10,8 @@
+
+
diff --git a/demo/Ursa.Demo/Pages/TimeBoxDemo.axaml b/demo/Ursa.Demo/Pages/TimeBoxDemo.axaml
new file mode 100644
index 00000000..f6919863
--- /dev/null
+++ b/demo/Ursa.Demo/Pages/TimeBoxDemo.axaml
@@ -0,0 +1,67 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/demo/Ursa.Demo/Pages/TimeBoxDemo.axaml.cs b/demo/Ursa.Demo/Pages/TimeBoxDemo.axaml.cs
new file mode 100644
index 00000000..5811b1bf
--- /dev/null
+++ b/demo/Ursa.Demo/Pages/TimeBoxDemo.axaml.cs
@@ -0,0 +1,13 @@
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Markup.Xaml;
+
+namespace Ursa.Demo.Pages;
+
+public partial class TimeBoxDemo : UserControl
+{
+ public TimeBoxDemo()
+ {
+ InitializeComponent();
+ }
+}
\ No newline at end of file
diff --git a/demo/Ursa.Demo/Pages/TimePickerDemo.axaml b/demo/Ursa.Demo/Pages/TimePickerDemo.axaml
new file mode 100644
index 00000000..7a8c8bf9
--- /dev/null
+++ b/demo/Ursa.Demo/Pages/TimePickerDemo.axaml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/demo/Ursa.Demo/Pages/TimePickerDemo.axaml.cs b/demo/Ursa.Demo/Pages/TimePickerDemo.axaml.cs
new file mode 100644
index 00000000..330eb980
--- /dev/null
+++ b/demo/Ursa.Demo/Pages/TimePickerDemo.axaml.cs
@@ -0,0 +1,13 @@
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Markup.Xaml;
+
+namespace Ursa.Demo.Pages;
+
+public partial class TimePickerDemo : UserControl
+{
+ public TimePickerDemo()
+ {
+ InitializeComponent();
+ }
+}
\ No newline at end of file
diff --git a/demo/Ursa.Demo/Pages/ToolBarDemo.axaml b/demo/Ursa.Demo/Pages/ToolBarDemo.axaml
index b00fc45b..c852b9c5 100644
--- a/demo/Ursa.Demo/Pages/ToolBarDemo.axaml
+++ b/demo/Ursa.Demo/Pages/ToolBarDemo.axaml
@@ -26,6 +26,11 @@
Orientation="{Binding #Orientation.Value}">
+
+
+
+
+
diff --git a/demo/Ursa.Demo/Pages/TreeComboBoxDemo.axaml b/demo/Ursa.Demo/Pages/TreeComboBoxDemo.axaml
new file mode 100644
index 00000000..e204bff7
--- /dev/null
+++ b/demo/Ursa.Demo/Pages/TreeComboBoxDemo.axaml
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/demo/Ursa.Demo/Pages/TreeComboBoxDemo.axaml.cs b/demo/Ursa.Demo/Pages/TreeComboBoxDemo.axaml.cs
new file mode 100644
index 00000000..63384668
--- /dev/null
+++ b/demo/Ursa.Demo/Pages/TreeComboBoxDemo.axaml.cs
@@ -0,0 +1,13 @@
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Markup.Xaml;
+
+namespace Ursa.Demo.Pages;
+
+public partial class TreeComboBoxDemo : UserControl
+{
+ public TreeComboBoxDemo()
+ {
+ InitializeComponent();
+ }
+}
\ No newline at end of file
diff --git a/demo/Ursa.Demo/Pages/VerificationCodeDemo.axaml b/demo/Ursa.Demo/Pages/VerificationCodeDemo.axaml
new file mode 100644
index 00000000..43e4ac88
--- /dev/null
+++ b/demo/Ursa.Demo/Pages/VerificationCodeDemo.axaml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
diff --git a/demo/Ursa.Demo/Pages/VerificationCodeDemo.axaml.cs b/demo/Ursa.Demo/Pages/VerificationCodeDemo.axaml.cs
new file mode 100644
index 00000000..5933b5c1
--- /dev/null
+++ b/demo/Ursa.Demo/Pages/VerificationCodeDemo.axaml.cs
@@ -0,0 +1,21 @@
+using System;
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Markup.Xaml;
+using Ursa.Controls;
+
+namespace Ursa.Demo.Pages;
+
+public partial class VerificationCodeDemo : UserControl
+{
+ public VerificationCodeDemo()
+ {
+ InitializeComponent();
+ }
+
+ private async void VerificationCode_OnComplete(object? sender, VerificationCodeCompleteEventArgs e)
+ {
+ var text = string.Join(string.Empty, e.Code);
+ await MessageBox.ShowOverlayAsync(text);
+ }
+}
\ No newline at end of file
diff --git a/demo/Ursa.Demo/Ursa.Demo.csproj b/demo/Ursa.Demo/Ursa.Demo.csproj
index cdf1e1ba..e95fe55e 100644
--- a/demo/Ursa.Demo/Ursa.Demo.csproj
+++ b/demo/Ursa.Demo/Ursa.Demo.csproj
@@ -1,6 +1,6 @@
-
+
- net6.0
+ net8.0
enable
latest
false
@@ -18,8 +18,8 @@
-
-
+
+
@@ -28,8 +28,6 @@
-
- SkeletonDemo.axaml
-
+
diff --git a/demo/Ursa.Demo/ViewModels/AvatarDemoViewModel.cs b/demo/Ursa.Demo/ViewModels/AvatarDemoViewModel.cs
new file mode 100644
index 00000000..6717d412
--- /dev/null
+++ b/demo/Ursa.Demo/ViewModels/AvatarDemoViewModel.cs
@@ -0,0 +1,16 @@
+using CommunityToolkit.Mvvm.ComponentModel;
+using CommunityToolkit.Mvvm.Input;
+
+namespace Ursa.Demo.ViewModels;
+
+public partial class AvatarDemoViewModel : ViewModelBase
+{
+ [ObservableProperty] private string _content = "AS";
+ [ObservableProperty] private bool _canClick = true;
+
+ [RelayCommand(CanExecute = nameof(CanClick))]
+ private void Click()
+ {
+ Content = "BM";
+ }
+}
\ No newline at end of file
diff --git a/demo/Ursa.Demo/ViewModels/BreadcrumbDemoViewModel.cs b/demo/Ursa.Demo/ViewModels/BreadcrumbDemoViewModel.cs
new file mode 100644
index 00000000..d5dbbeef
--- /dev/null
+++ b/demo/Ursa.Demo/ViewModels/BreadcrumbDemoViewModel.cs
@@ -0,0 +1,41 @@
+using System.Collections.ObjectModel;
+using System.Windows.Input;
+using CommunityToolkit.Mvvm.ComponentModel;
+using CommunityToolkit.Mvvm.Input;
+using Ursa.Controls;
+
+namespace Ursa.Demo.ViewModels;
+
+public class BreadcrumbDemoViewModel: ObservableObject
+{
+ public ObservableCollection Items1 { get; set; }
+
+ public BreadcrumbDemoViewModel()
+ {
+ Items1 = new ObservableCollection()
+ {
+ new BreadcrumbDemoItem() { Section = "Home", Icon = "Home" },
+ new BreadcrumbDemoItem() { Section = "Page 1", Icon = "Page" },
+ new BreadcrumbDemoItem() { Section = "Page 2", Icon = "Page" },
+ new BreadcrumbDemoItem() { Section = "Page 3", Icon = "Page" },
+ new BreadcrumbDemoItem() { Section = "Page 4", Icon = "Page", IsReadOnly = true},
+ };
+ }
+}
+
+public partial class BreadcrumbDemoItem: ObservableObject
+{
+ public string Section { get; set; }
+ public string Icon { get; set; }
+ [ObservableProperty] private bool _isReadOnly;
+
+ public ICommand Command { get; set; }
+
+ public BreadcrumbDemoItem()
+ {
+ Command = new RelayCommand(() =>
+ {
+ MessageBox.ShowOverlayAsync(Section);
+ });
+ }
+}
\ No newline at end of file
diff --git a/demo/Ursa.Demo/ViewModels/ClockDemoViewModel.cs b/demo/Ursa.Demo/ViewModels/ClockDemoViewModel.cs
new file mode 100644
index 00000000..48cda912
--- /dev/null
+++ b/demo/Ursa.Demo/ViewModels/ClockDemoViewModel.cs
@@ -0,0 +1,31 @@
+using System;
+using System.Timers;
+using CommunityToolkit.Mvvm.ComponentModel;
+
+namespace Ursa.Demo.ViewModels;
+
+public partial class ClockDemoViewModel: ObservableObject, IDisposable
+{
+ private Timer _timer;
+
+ [ObservableProperty] private DateTime _time;
+ public ClockDemoViewModel()
+ {
+ Time = DateTime.Now;
+ _timer = new Timer(1000);
+ _timer.Elapsed += TimerOnElapsed;
+ _timer.Start();
+ }
+
+ private void TimerOnElapsed(object? sender, ElapsedEventArgs e)
+ {
+ Time = DateTime.Now;
+ }
+
+ public void Dispose()
+ {
+ _timer.Stop();
+ _timer.Elapsed -= TimerOnElapsed;
+ _timer.Dispose();
+ }
+}
\ No newline at end of file
diff --git a/demo/Ursa.Demo/ViewModels/DatePickerDemoViewModel.cs b/demo/Ursa.Demo/ViewModels/DatePickerDemoViewModel.cs
new file mode 100644
index 00000000..f77041c3
--- /dev/null
+++ b/demo/Ursa.Demo/ViewModels/DatePickerDemoViewModel.cs
@@ -0,0 +1,6 @@
+namespace Ursa.Demo.ViewModels;
+
+public class DatePickerDemoViewModel
+{
+
+}
\ No newline at end of file
diff --git a/demo/Ursa.Demo/ViewModels/DialogDemoViewModel.cs b/demo/Ursa.Demo/ViewModels/DialogDemoViewModel.cs
index cf5d6b3f..4ccda873 100644
--- a/demo/Ursa.Demo/ViewModels/DialogDemoViewModel.cs
+++ b/demo/Ursa.Demo/ViewModels/DialogDemoViewModel.cs
@@ -11,85 +11,30 @@
namespace Ursa.Demo.ViewModels;
-public class DialogDemoViewModel: ObservableObject
+public partial class DialogDemoViewModel: ObservableObject
{
public ICommand ShowDialogCommand { get; set; }
public ICommand ShowCustomDialogCommand { get; set; }
- private DialogMode _selectedMode;
- public DialogMode SelectedMode
- {
- get => _selectedMode;
- set => SetProperty(ref _selectedMode, value);
- }
-
- public ObservableCollection Modes { get; set; }
-
- private DialogButton _selectedButton;
- public DialogButton SelectedButton
- {
- get => _selectedButton;
- set => SetProperty(ref _selectedButton, value);
- }
-
- public ObservableCollection Buttons { get; set; }
-
- private bool _isWindow;
- public bool IsWindow
- {
- get => _isWindow;
- set => SetProperty(ref _isWindow, value);
- }
-
- private bool _isGlobal;
- public bool IsGlobal
- {
- get => _isGlobal;
- set => SetProperty(ref _isGlobal, value);
- }
-
- private bool _isModal;
- public bool IsModal
- {
- get => _isModal;
- set => SetProperty(ref _isModal, value);
- }
-
- private bool _canLightDismiss;
- public bool CanLightDismiss
- {
- get => _canLightDismiss;
- set => SetProperty(ref _canLightDismiss, value);
- }
-
- private DialogResult? _defaultResult;
- public DialogResult? DefaultResult
- {
- get => _defaultResult;
- set => SetProperty(ref _defaultResult, value);
- }
-
- private bool _result;
- public bool Result
- {
- get => _result;
- set => SetProperty(ref _result, value);
- }
-
- private DateTime? _date;
- public DateTime? Date
- {
- get => _date;
- set => SetProperty(ref _date, value);
- }
-
+ [ObservableProperty] private DialogMode _selectedMode;
+ [ObservableProperty] private DialogButton _selectedButton;
+ [ObservableProperty] private bool _isWindow;
+ [ObservableProperty] private bool _isGlobal;
+ [ObservableProperty] private bool _isModal;
+ [ObservableProperty] private bool _canLightDismiss;
+ [ObservableProperty] private DialogResult? _defaultResult;
+ [ObservableProperty] private bool _result;
+ [ObservableProperty] private DateTime? _date;
+ [ObservableProperty] private bool _fullScreen;
+ [ObservableProperty] private bool _showInTaskBar;
public DialogDemoViewModel()
{
ShowDialogCommand = new AsyncRelayCommand(ShowDialog);
ShowCustomDialogCommand = new AsyncRelayCommand(ShowCustomDialog);
- Modes = new ObservableCollection(Enum.GetValues());
- Buttons = new ObservableCollection(Enum.GetValues());
+ IsModal = true;
+ IsGlobal = true;
+ ShowInTaskBar = false;
}
private async Task ShowDialog()
@@ -102,7 +47,8 @@ private async Task ShowDialog()
{
Title = "Please select a date",
Mode = SelectedMode,
- Button = SelectedButton
+ Button = SelectedButton,
+ ShowInTaskBar = ShowInTaskBar,
});
Date = vm.Date;
}
@@ -123,6 +69,7 @@ private async Task ShowDialog()
HorizontalOffset = 50,
VerticalAnchor = VerticalPosition.Top,
VerticalOffset = 50,
+ FullScreen = FullScreen,
}
);
Date = vm.Date;
@@ -138,6 +85,7 @@ private async Task ShowDialog()
Mode = SelectedMode,
Buttons = SelectedButton,
CanLightDismiss = CanLightDismiss,
+ FullScreen = FullScreen,
});
}
}
@@ -149,19 +97,25 @@ private async Task ShowCustomDialog()
var vm = new DialogWithActionViewModel();
if (IsWindow)
{
-
if (IsModal)
{
Result = await Dialog.ShowCustomModal(
- vm);
+ vm,
+ options: new DialogOptions
+ {
+ ShowInTaskBar = ShowInTaskBar
+ });
Date = vm.Date;
}
else
{
Dialog.ShowCustom(
- vm);
+ vm,
+ options: new DialogOptions
+ {
+ ShowInTaskBar = ShowInTaskBar
+ });
}
-
}
else
{
@@ -171,6 +125,7 @@ private async Task ShowCustomDialog()
vm, IsGlobal ? null : "LocalHost", options: new OverlayDialogOptions()
{
CanLightDismiss = CanLightDismiss,
+ FullScreen = FullScreen,
});
Date = vm.Date;
}
@@ -178,7 +133,7 @@ private async Task ShowCustomDialog()
{
OverlayDialog.ShowCustom(new DialogWithActionViewModel(),
IsGlobal ? null : "LocalHost",
- options: new OverlayDialogOptions{ CanLightDismiss = CanLightDismiss });
+ options: new OverlayDialogOptions{ CanLightDismiss = CanLightDismiss, FullScreen = FullScreen});
}
}
diff --git a/demo/Ursa.Demo/ViewModels/DrawerDemoViewModel.cs b/demo/Ursa.Demo/ViewModels/DrawerDemoViewModel.cs
index e51586b0..c4380209 100644
--- a/demo/Ursa.Demo/ViewModels/DrawerDemoViewModel.cs
+++ b/demo/Ursa.Demo/ViewModels/DrawerDemoViewModel.cs
@@ -31,6 +31,9 @@ public DrawerDemoViewModel()
{
ShowDialogCommand = new AsyncRelayCommand(ShowDefaultDialog);
ShowCustomDialogCommand = new AsyncRelayCommand(ShowCustomDrawer);
+ SelectedPosition = Position.Right;
+ IsGlobal = true;
+ IsModal = true;
}
private async Task ShowDefaultDialog()
diff --git a/demo/Ursa.Demo/ViewModels/ElasticWrapPanelDemoViewModel.cs b/demo/Ursa.Demo/ViewModels/ElasticWrapPanelDemoViewModel.cs
new file mode 100644
index 00000000..4964f36f
--- /dev/null
+++ b/demo/Ursa.Demo/ViewModels/ElasticWrapPanelDemoViewModel.cs
@@ -0,0 +1,54 @@
+using Avalonia.Controls.Primitives;
+using Avalonia.Layout;
+using CommunityToolkit.Mvvm.ComponentModel;
+
+namespace Ursa.Demo.ViewModels;
+
+public partial class ElasticWrapPanelDemoViewModel : ObservableObject
+{
+ [ObservableProperty] private Orientation _selectedOrientation = Orientation.Horizontal;
+ [ObservableProperty] private ScrollBarVisibility _horizontalVisibility = ScrollBarVisibility.Auto;
+ [ObservableProperty] private ScrollBarVisibility _verticalVisibility = ScrollBarVisibility.Auto;
+
+ [ObservableProperty] private bool _isFillHorizontal;
+ [ObservableProperty] private bool _isFillVertical;
+ [ObservableProperty] private double _itemWidth = 40d;
+ [ObservableProperty] private double _itemHeight = 40d;
+
+ [ObservableProperty] private bool _autoWidth = true;
+ [ObservableProperty] private bool _autoHeight = true;
+ [ObservableProperty] private double _itemSelfWidth = double.NaN;
+ [ObservableProperty] private double _itemSelfHeight = double.NaN;
+
+ [ObservableProperty] private HorizontalAlignment _cmbHAlign = HorizontalAlignment.Left;
+ [ObservableProperty] private VerticalAlignment _cmbVAlign = VerticalAlignment.Stretch;
+
+ private double _oldItemSelfWidth;
+ private double _oldItemSelfHeight;
+
+ partial void OnAutoWidthChanged(bool value)
+ {
+ if (value)
+ {
+ _oldItemSelfWidth = ItemSelfWidth;
+ ItemSelfWidth = double.NaN;
+ }
+ else
+ {
+ ItemSelfWidth = _oldItemSelfWidth;
+ }
+ }
+
+ partial void OnAutoHeightChanged(bool value)
+ {
+ if (value)
+ {
+ _oldItemSelfHeight = ItemSelfHeight;
+ ItemSelfHeight = double.NaN;
+ }
+ else
+ {
+ ItemSelfHeight = _oldItemSelfHeight;
+ }
+ }
+}
\ No newline at end of file
diff --git a/demo/Ursa.Demo/ViewModels/MainViewViewModel.cs b/demo/Ursa.Demo/ViewModels/MainViewViewModel.cs
index 8cc13e63..4bd2bab5 100644
--- a/demo/Ursa.Demo/ViewModels/MainViewViewModel.cs
+++ b/demo/Ursa.Demo/ViewModels/MainViewViewModel.cs
@@ -25,15 +25,20 @@ private void OnNavigation(MainViewViewModel vm, string s)
Content = s switch
{
MenuKeys.MenuKeyIntroduction => new IntroductionDemoViewModel(),
+ MenuKeys.MenuKeyAvatar => new AvatarDemoViewModel(),
MenuKeys.MenuKeyBadge => new BadgeDemoViewModel(),
MenuKeys.MenuKeyBanner => new BannerDemoViewModel(),
MenuKeys.MenuKeyButtonGroup => new ButtonGroupDemoViewModel(),
+ MenuKeys.MenuKeyBreadcrumb => new BreadcrumbDemoViewModel(),
MenuKeys.MenuKeyClassInput => new ClassInputDemoViewModel(),
+ MenuKeys.MenuKeyClock => new ClockDemoViewModel(),
+ MenuKeys.MenuKeyDatePicker => new DatePickerDemoViewModel(),
MenuKeys.MenuKeyDialog => new DialogDemoViewModel(),
MenuKeys.MenuKeyDivider => new DividerDemoViewModel(),
MenuKeys.MenuKeyDisableContainer => new DisableContainerDemoViewModel(),
MenuKeys.MenuKeyDrawer => new DrawerDemoViewModel(),
MenuKeys.MenuKeyDualBadge => new DualBadgeDemoViewModel(),
+ MenuKeys.MenuKeyElasticWrapPanel => new ElasticWrapPanelDemoViewModel(),
MenuKeys.MenuKeyEnumSelector => new EnumSelectorDemoViewModel(),
MenuKeys.MenuKeyForm => new FormDemoViewModel(),
MenuKeys.MenuKeyImageViewer => new ImageViewerDemoViewModel(),
@@ -42,18 +47,26 @@ private void OnNavigation(MainViewViewModel vm, string s)
MenuKeys.MenuKeyKeyGestureInput => new KeyGestureInputDemoViewModel(),
MenuKeys.MenuKeyLoading => new LoadingDemoViewModel(),
MenuKeys.MenuKeyMessageBox => new MessageBoxDemoViewModel(),
+ MenuKeys.MenuKeyMultiComboBox => new MultiComboBoxDemoViewModel(),
MenuKeys.MenuKeyNavMenu => new NavMenuDemoViewModel(),
MenuKeys.MenuKeyNumberDisplayer => new NumberDisplayerDemoViewModel(),
MenuKeys.MenuKeyNumericUpDown => new NumericUpDownDemoViewModel(),
+ MenuKeys.MenuKeyNumPad => new NumPadDemoViewModel(),
MenuKeys.MenuKeyPagination => new PaginationDemoViewModel(),
MenuKeys.MenuKeyRangeSlider => new RangeSliderDemoViewModel(),
+ MenuKeys.MenuKeyRating => new RatingDemoViewModel(),
+ MenuKeys.MenuKeyScrollToButton => new ScrollToButtonDemoViewModel(),
MenuKeys.MenuKeySelectionList => new SelectionListDemoViewModel(),
MenuKeys.MenuKeySkeleton => new SkeletonDemoViewModel(),
MenuKeys.MenuKeyTagInput => new TagInputDemoViewModel(),
+ MenuKeys.MenuKeyTimePicker => new TimePickerDemoViewModel(),
MenuKeys.MenuKeyTimeline => new TimelineDemoViewModel(),
+ MenuKeys.MenuKeyTreeComboBox => new TreeComboBoxDemoViewModel(),
MenuKeys.MenuKeyTwoTonePathIcon => new TwoTonePathIconDemoViewModel(),
MenuKeys.MenuKeyThemeToggler => new ThemeTogglerDemoViewModel(),
MenuKeys.MenuKeyToolBar => new ToolBarDemoViewModel(),
+ MenuKeys.MenuKeyTimeBox => new TimeBoxDemoViewModel(),
+ MenuKeys.MenuKeyVerificationCode => new VerificationCodeDemoViewModel(),
};
}
}
\ No newline at end of file
diff --git a/demo/Ursa.Demo/ViewModels/MenuViewModel.cs b/demo/Ursa.Demo/ViewModels/MenuViewModel.cs
index a25e8d1f..231dd0d7 100644
--- a/demo/Ursa.Demo/ViewModels/MenuViewModel.cs
+++ b/demo/Ursa.Demo/ViewModels/MenuViewModel.cs
@@ -12,35 +12,96 @@ public MenuViewModel()
{
new() { MenuHeader = "Introduction", Key = MenuKeys.MenuKeyIntroduction, IsSeparator = false },
new() { MenuHeader = "Controls", IsSeparator = true },
- new() { MenuHeader = "Badge", Key = MenuKeys.MenuKeyBadge, Status = "Updated"},
+ new() { MenuHeader = "Avatar", Key = MenuKeys.MenuKeyAvatar, Status = "WIP"},
+ new() { MenuHeader = "Badge", Key = MenuKeys.MenuKeyBadge },
new() { MenuHeader = "Banner", Key = MenuKeys.MenuKeyBanner },
- new() { MenuHeader = "Button Group", Key = MenuKeys.MenuKeyButtonGroup},
- new() { MenuHeader = "Class Input", Key = MenuKeys.MenuKeyClassInput, Status = "New" },
- new() { MenuHeader = "Dialog", Key = MenuKeys.MenuKeyDialog, Status = "Updated"},
- new() { MenuHeader = "Disable Container", Key = MenuKeys.MenuKeyDisableContainer, Status = "New"},
+ new() { MenuHeader = "Breadcrumb", Key = MenuKeys.MenuKeyBreadcrumb },
+ new() { MenuHeader = "Button Group", Key = MenuKeys.MenuKeyButtonGroup },
+ new() { MenuHeader = "Class Input", Key = MenuKeys.MenuKeyClassInput },
+ new() { MenuHeader = "Clock", Key = MenuKeys.MenuKeyClock, Status = "Updated" },
+ new() { MenuHeader = "Date Picker", Key = MenuKeys.MenuKeyDatePicker, Status = "New"},
+ new() { MenuHeader = "Dialog", Key = MenuKeys.MenuKeyDialog },
+ new() { MenuHeader = "Disable Container", Key = MenuKeys.MenuKeyDisableContainer },
new() { MenuHeader = "Divider", Key = MenuKeys.MenuKeyDivider },
- new() { MenuHeader = "Drawer", Key = MenuKeys.MenuKeyDrawer, Status = "New"},
+ new() { MenuHeader = "Drawer", Key = MenuKeys.MenuKeyDrawer },
new() { MenuHeader = "DualBadge", Key = MenuKeys.MenuKeyDualBadge },
+ new() { MenuHeader = "ElasticWrapPanel", Key = MenuKeys.MenuKeyElasticWrapPanel, Status = "New"},
new() { MenuHeader = "Enum Selector", Key = MenuKeys.MenuKeyEnumSelector },
- new() { MenuHeader = "Form", Key = MenuKeys.MenuKeyForm, Status = "New" },
+ new() { MenuHeader = "Form", Key = MenuKeys.MenuKeyForm },
new() { MenuHeader = "Icon Button", Key = MenuKeys.MenuKeyIconButton },
new() { MenuHeader = "ImageViewer", Key = MenuKeys.MenuKeyImageViewer, Status = "WIP" },
- new() { MenuHeader = "IPv4Box", Key = MenuKeys.MenuKeyIpBox, Status = "Updated" },
+ new() { MenuHeader = "IPv4Box", Key = MenuKeys.MenuKeyIpBox },
new() { MenuHeader = "KeyGestureInput", Key = MenuKeys.MenuKeyKeyGestureInput },
- new() { MenuHeader = "Loading", Key = MenuKeys.MenuKeyLoading, Status = "Updated" },
+ new() { MenuHeader = "Loading", Key = MenuKeys.MenuKeyLoading },
new() { MenuHeader = "Message Box", Key = MenuKeys.MenuKeyMessageBox },
- new() { MenuHeader = "Nav Menu", Key = MenuKeys.MenuKeyNavMenu, Status = "New"},
- // new() { MenuHeader = "Number Displayer", Key = MenuKeys.MenuKeyNumberDisplayer, Status = "New" },
+ new() { MenuHeader = "MultiComboBox", Key = MenuKeys.MenuKeyMultiComboBox, Status = "Updated" },
+ new() { MenuHeader = "Nav Menu", Key = MenuKeys.MenuKeyNavMenu },
+ new() { MenuHeader = "Number Displayer", Key = MenuKeys.MenuKeyNumberDisplayer, Status = "New" },
new() { MenuHeader = "Numeric UpDown", Key = MenuKeys.MenuKeyNumericUpDown },
+ new() { MenuHeader = "NumPad", Key = MenuKeys.MenuKeyNumPad },
new() { MenuHeader = "Pagination", Key = MenuKeys.MenuKeyPagination },
new() { MenuHeader = "RangeSlider", Key = MenuKeys.MenuKeyRangeSlider },
- new() { MenuHeader = "Selection List", Key = MenuKeys.MenuKeySelectionList, Status = "New" },
- new() { MenuHeader = "Skeleton", Key = MenuKeys.MenuKeySkeleton, Status = "New" },
- new() { MenuHeader = "TagInput", Key = MenuKeys.MenuKeyTagInput },
- new() { MenuHeader = "Theme Toggler", Key = MenuKeys.MenuKeyThemeToggler, Status = "New" },
- new() { MenuHeader = "Timeline", Key = MenuKeys.MenuKeyTimeline, Status = "WIP" },
+ new() { MenuHeader = "Rating", Key = MenuKeys.MenuKeyRating, Status = "New"},
+ new() { MenuHeader = "Scroll To", Key = MenuKeys.MenuKeyScrollToButton },
+ new() { MenuHeader = "Selection List", Key = MenuKeys.MenuKeySelectionList },
+ new() { MenuHeader = "Skeleton", Key = MenuKeys.MenuKeySkeleton },
+ new() { MenuHeader = "TagInput", Key = MenuKeys.MenuKeyTagInput, Status = "Updated" },
+ new() { MenuHeader = "Theme Toggler", Key = MenuKeys.MenuKeyThemeToggler },
+ new() { MenuHeader = "TimePicker", Key = MenuKeys.MenuKeyTimePicker },
+ new() { MenuHeader = "Timeline", Key = MenuKeys.MenuKeyTimeline },
+ new() { MenuHeader = "TreeComboBox", Key = MenuKeys.MenuKeyTreeComboBox },
new() { MenuHeader = "TwoTonePathIcon", Key = MenuKeys.MenuKeyTwoTonePathIcon},
- new() { MenuHeader = "ToolBar", Key = MenuKeys.MenuKeyToolBar, Status = "New" }
+ new() { MenuHeader = "ToolBar", Key = MenuKeys.MenuKeyToolBar },
+ new() { MenuHeader = "Time Box", Key = MenuKeys.MenuKeyTimeBox },
+ new() { MenuHeader = "Verification Code", Key = MenuKeys.MenuKeyVerificationCode},
};
}
+}
+
+public static class MenuKeys
+{
+ public const string MenuKeyIntroduction = "Introduction";
+ public const string MenuKeyAvatar = "Avatar";
+ public const string MenuKeyBadge = "Badge";
+ public const string MenuKeyBanner = "Banner";
+ public const string MenuKeyButtonGroup = "ButtonGroup";
+ public const string MenuKeyBreadcrumb= "Breadcrumb";
+ public const string MenuKeyClassInput = "Class Input";
+ public const string MenuKeyClock = "Clock";
+ public const string MenuKeyDatePicker = "DatePicker";
+ public const string MenuKeyDialog = "Dialog";
+ public const string MenuKeyDivider = "Divider";
+ public const string MenuKeyDisableContainer = "DisableContainer";
+ public const string MenuKeyDrawer = "Drawer";
+ public const string MenuKeyDualBadge = "DualBadge";
+ public const string MenuKeyElasticWrapPanel = "ElasticWrapPanel";
+ public const string MenuKeyEnumSelector = "EnumSelector";
+ public const string MenuKeyForm = "Form";
+ public const string MenuKeyImageViewer = "ImageViewer";
+ public const string MenuKeyIpBox = "IPv4Box";
+ public const string MenuKeyIconButton = "IconButton";
+ public const string MenuKeyKeyGestureInput = "KeyGestureInput";
+ public const string MenuKeyLoading = "Loading";
+ public const string MenuKeyMessageBox = "MessageBox";
+ public const string MenuKeyMultiComboBox = "MultiComboBox";
+ public const string MenuKeyNavMenu = "NavMenu";
+ public const string MenuKeyNumberDisplayer = "NumberDisplayer";
+ public const string MenuKeyNumericUpDown = "NumericUpDown";
+ public const string MenuKeyNumPad = "NumPad";
+ public const string MenuKeyPagination = "Pagination";
+ public const string MenuKeyRangeSlider = "RangeSlider";
+ public const string MenuKeyRating = "Rating";
+ public const string MenuKeyScrollToButton = "ScrollToButton";
+ public const string MenuKeySelectionList = "SelectionList";
+ public const string MenuKeyTagInput = "TagInput";
+ public const string MenuKeySkeleton = "Skeleton";
+ public const string MenuKeyTimePicker = "TimePicker";
+ public const string MenuKeyTimeline = "Timeline";
+ public const string MenuKeyTwoTonePathIcon = "TwoTonePathIcon";
+ public const string MenuKeyThemeToggler = "ThemeToggler";
+ public const string MenuKeyTreeComboBox = "TreeComboBox";
+ public const string MenuKeyToolBar = "ToolBar";
+ public const string MenuKeyVerificationCode = "VerificationCode";
+ public const string MenuKeyTimeBox = "TimeBox";
+
}
\ No newline at end of file
diff --git a/demo/Ursa.Demo/ViewModels/MultiComboBoxDemoViewModel.cs b/demo/Ursa.Demo/ViewModels/MultiComboBoxDemoViewModel.cs
new file mode 100644
index 00000000..277332d3
--- /dev/null
+++ b/demo/Ursa.Demo/ViewModels/MultiComboBoxDemoViewModel.cs
@@ -0,0 +1,51 @@
+using System.Collections.ObjectModel;
+using CommunityToolkit.Mvvm.ComponentModel;
+
+namespace Ursa.Demo.ViewModels;
+
+public class MultiComboBoxDemoViewModel: ObservableObject
+{
+ public ObservableCollection Items { get; set; }
+
+ public MultiComboBoxDemoViewModel()
+ {
+ Items = new ObservableCollection()
+ {
+ "Item 1",
+ "Item 2",
+ "Item 3",
+ "Item 4",
+ "Item 5",
+ "Item 6",
+ "Item 7",
+ "Item 8",
+ "Illinois",
+ "Indiana",
+ "Iowa",
+ "Kansas",
+ "Kentucky",
+ "Louisiana",
+ "Maine",
+ "Maryland",
+ "Massachusetts",
+ "Michigan",
+ "Minnesota",
+ "Mississippi",
+ "Missouri",
+ "Montana",
+ "Nebraska",
+ "Nevada",
+ "New Hampshire",
+ "New Jersey",
+ "New Mexico",
+ "New York",
+ "North Carolina",
+ "North Dakota",
+ "Ohio",
+ "Oklahoma",
+ "Oregon",
+ "Pennsylvania",
+ "Rhode Island",
+ };
+ }
+}
\ No newline at end of file
diff --git a/demo/Ursa.Demo/ViewModels/NumPadDemoViewModel.cs b/demo/Ursa.Demo/ViewModels/NumPadDemoViewModel.cs
new file mode 100644
index 00000000..88fcfb13
--- /dev/null
+++ b/demo/Ursa.Demo/ViewModels/NumPadDemoViewModel.cs
@@ -0,0 +1,6 @@
+namespace Ursa.Demo.ViewModels;
+
+public class NumPadDemoViewModel
+{
+
+}
\ No newline at end of file
diff --git a/demo/Ursa.Demo/ViewModels/NumericUpDownDemoViewModel.cs b/demo/Ursa.Demo/ViewModels/NumericUpDownDemoViewModel.cs
index 9840ccaf..663b5f1c 100644
--- a/demo/Ursa.Demo/ViewModels/NumericUpDownDemoViewModel.cs
+++ b/demo/Ursa.Demo/ViewModels/NumericUpDownDemoViewModel.cs
@@ -1,8 +1,83 @@
-using CommunityToolkit.Mvvm.ComponentModel;
+using Avalonia.Controls;
+using Avalonia.Layout;
+using CommunityToolkit.Mvvm.ComponentModel;
+using CommunityToolkit.Mvvm.Input;
+using System;
+using System.Globalization;
+using Ursa.Controls;
+using static System.Runtime.InteropServices.JavaScript.JSType;
namespace Ursa.Demo.ViewModels;
-public class NumericUpDownDemoViewModel: ObservableObject
+public partial class NumericUpDownDemoViewModel : ObservableObject
{
-
+
+
+ private double _oldWidth = 300;
+ [ObservableProperty] private bool _AutoWidth = true;
+ [ObservableProperty] private double _Width = Double.NaN;
+ [ObservableProperty] private uint _Value;
+ [ObservableProperty] private string _FontFamily = "Consolas";
+ [ObservableProperty] private bool _AllowDrag = false;
+ [ObservableProperty] private bool _IsReadOnly = false;
+
+ [ObservableProperty] private Array _Array_HorizontalAlignment;
+ [ObservableProperty] private HorizontalAlignment _HorizontalAlignment = HorizontalAlignment.Center;
+
+ [ObservableProperty] private Array _Array_HorizontalContentAlignment;
+ [ObservableProperty] private HorizontalAlignment _HorizontalContentAlignment = HorizontalAlignment.Center;
+ [ObservableProperty] private object? _InnerLeftContent = "obj:0x";
+ [ObservableProperty] private string _Watermark = "Water mark showed";
+ [ObservableProperty] private string _FormatString = "X8";
+ [ObservableProperty] private Array _Array_ParsingNumberStyle;
+ [ObservableProperty] private NumberStyles _ParsingNumberStyle = NumberStyles.AllowHexSpecifier;
+ [ObservableProperty] private bool _AllowSpin = true;
+ [ObservableProperty] private bool _ShowButtonSpinner = true;
+
+ [ObservableProperty] private UInt32 _Maximum = UInt32.MaxValue;
+ [ObservableProperty] private UInt32 _Minimum = UInt32.MinValue;
+ [ObservableProperty] private UInt32 _Step = 1;
+
+ [ObservableProperty] private bool _IsEnable = true;
+
+ [ObservableProperty] private string _CommandUpdateText = "Command not Execute";
+
+ uint v = 0;
+ [RelayCommand]
+ // void Trythis()
+ void Trythis(uint v)
+ // void Trythis(object v)
+ {
+ CommandUpdateText = $"Command Exe,CommandParameter={v}";
+ }
+
+
+ public NumericUpDownDemoViewModel()
+ {
+ Array_HorizontalContentAlignment = Enum.GetValues(typeof(HorizontalAlignment));
+ Array_HorizontalAlignment = Enum.GetValues(typeof(HorizontalAlignment));
+ Array_ParsingNumberStyle = Enum.GetValues(typeof(NumberStyles));
+ NumericUIntUpDown numericUIntUpDown;
+ TextBox textBox;
+
+ }
+
+ partial void OnAutoWidthChanged(bool value)
+ {
+ if (value)
+ {
+ _oldWidth = Width;
+ Width = double.NaN;
+ }
+ else
+ {
+ Width = _oldWidth;
+ }
+ }
+
+ partial void OnValueChanging(uint oldValue, uint newValue)
+ {
+ // Console.WriteLine(oldValue);
+ }
+
}
\ No newline at end of file
diff --git a/demo/Ursa.Demo/ViewModels/PaginationDemoViewModel.cs b/demo/Ursa.Demo/ViewModels/PaginationDemoViewModel.cs
index 55bb942c..a64dc9c4 100644
--- a/demo/Ursa.Demo/ViewModels/PaginationDemoViewModel.cs
+++ b/demo/Ursa.Demo/ViewModels/PaginationDemoViewModel.cs
@@ -1,11 +1,25 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
+using System.Diagnostics;
+using System.Windows.Input;
using Avalonia.Collections;
using CommunityToolkit.Mvvm.ComponentModel;
+using CommunityToolkit.Mvvm.Input;
namespace Ursa.Demo.ViewModels;
-public class PaginationDemoViewModel: ViewModelBase
+public class PaginationDemoViewModel : ViewModelBase
{
public AvaloniaList PageSizes { get; set; } = new() { 10, 20, 50, 100 };
+
+ public ICommand LoadPageCommand { get; }
+ public PaginationDemoViewModel()
+ {
+ this.LoadPageCommand = new RelayCommand(LoadPage);
+ }
+
+ private void LoadPage(int? pageIndex)
+ {
+ Debug.WriteLine($"Loading page {pageIndex}");
+ }
}
\ No newline at end of file
diff --git a/demo/Ursa.Demo/ViewModels/RatingDemoViewModel.cs b/demo/Ursa.Demo/ViewModels/RatingDemoViewModel.cs
new file mode 100644
index 00000000..60286601
--- /dev/null
+++ b/demo/Ursa.Demo/ViewModels/RatingDemoViewModel.cs
@@ -0,0 +1,13 @@
+using CommunityToolkit.Mvvm.ComponentModel;
+
+namespace Ursa.Demo.ViewModels;
+
+public partial class RatingDemoViewModel : ViewModelBase
+{
+ [ObservableProperty] private bool _allowClear = true;
+ [ObservableProperty] private bool _allowHalf = true;
+ [ObservableProperty] private bool _isEnabled = true;
+ [ObservableProperty] private double _value;
+ [ObservableProperty] private double _defaultValue = 2.3;
+ [ObservableProperty] private int _count = 5;
+}
\ No newline at end of file
diff --git a/demo/Ursa.Demo/ViewModels/ScrollToButtonDemoViewModel.cs b/demo/Ursa.Demo/ViewModels/ScrollToButtonDemoViewModel.cs
new file mode 100644
index 00000000..833189f0
--- /dev/null
+++ b/demo/Ursa.Demo/ViewModels/ScrollToButtonDemoViewModel.cs
@@ -0,0 +1,15 @@
+using System.Collections.ObjectModel;
+using System.Linq;
+using CommunityToolkit.Mvvm.ComponentModel;
+
+namespace Ursa.Demo.ViewModels;
+
+public class ScrollToButtonDemoViewModel: ObservableObject
+{
+ public ObservableCollection Items { get; set; }
+
+ public ScrollToButtonDemoViewModel()
+ {
+ Items = new ObservableCollection(Enumerable.Range(0, 1000).Select(a => "Item " + a));
+ }
+}
\ No newline at end of file
diff --git a/demo/Ursa.Demo/ViewModels/SelectionListDemoViewModel.cs b/demo/Ursa.Demo/ViewModels/SelectionListDemoViewModel.cs
index 3711edd9..b05b20f1 100644
--- a/demo/Ursa.Demo/ViewModels/SelectionListDemoViewModel.cs
+++ b/demo/Ursa.Demo/ViewModels/SelectionListDemoViewModel.cs
@@ -14,6 +14,7 @@ public SelectionListDemoViewModel()
{
"Ding", "Otter", "Husky", "Mr. 17", "Cass"
};
+ SelectedItem = Items[0];
}
public void Clear()
diff --git a/demo/Ursa.Demo/ViewModels/TimeBoxDemoViewModel.cs b/demo/Ursa.Demo/ViewModels/TimeBoxDemoViewModel.cs
new file mode 100644
index 00000000..729b6c5d
--- /dev/null
+++ b/demo/Ursa.Demo/ViewModels/TimeBoxDemoViewModel.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Net;
+using CommunityToolkit.Mvvm.ComponentModel;
+using CommunityToolkit.Mvvm.Input;
+
+namespace Ursa.Demo.ViewModels;
+
+public partial class TimeBoxDemoViewModel : ObservableObject
+{
+ [ObservableProperty] private TimeSpan? _timeSpan;
+
+ [RelayCommand]
+ private void ChangeRandomTime()
+ {
+ TimeSpan = new TimeSpan(Random.Shared.NextInt64(0x00000000FFFFFFFF));
+ }
+
+ public TimeBoxDemoViewModel()
+ {
+ TimeSpan = new TimeSpan(0, 21, 11, 36, 54);
+ }
+}
\ No newline at end of file
diff --git a/demo/Ursa.Demo/ViewModels/TimePickerDemoViewModel.cs b/demo/Ursa.Demo/ViewModels/TimePickerDemoViewModel.cs
new file mode 100644
index 00000000..f115429e
--- /dev/null
+++ b/demo/Ursa.Demo/ViewModels/TimePickerDemoViewModel.cs
@@ -0,0 +1,8 @@
+using CommunityToolkit.Mvvm.ComponentModel;
+
+namespace Ursa.Demo.ViewModels;
+
+public class TimePickerDemoViewModel: ObservableObject
+{
+
+}
\ No newline at end of file
diff --git a/demo/Ursa.Demo/ViewModels/TreeComboBoxDemoViewModel.cs b/demo/Ursa.Demo/ViewModels/TreeComboBoxDemoViewModel.cs
new file mode 100644
index 00000000..998bb413
--- /dev/null
+++ b/demo/Ursa.Demo/ViewModels/TreeComboBoxDemoViewModel.cs
@@ -0,0 +1,68 @@
+using System.Collections.Generic;
+using CommunityToolkit.Mvvm.ComponentModel;
+
+namespace Ursa.Demo.ViewModels;
+
+public partial class TreeComboBoxDemoViewModel: ObservableObject
+{
+ [ObservableProperty] private TreeComboBoxItemViewModel? _selectedItem;
+ public List Items { get; set; }
+
+ public TreeComboBoxDemoViewModel()
+ {
+ Items = new List()
+ {
+ new TreeComboBoxItemViewModel()
+ {
+ ItemName = "Item 1",
+ Children = new List()
+ {
+ new TreeComboBoxItemViewModel()
+ {
+ ItemName = "Item 1-1",
+ Children = new List()
+ {
+ new TreeComboBoxItemViewModel()
+ {
+ ItemName = "Item 1-1-1"
+ },
+ new TreeComboBoxItemViewModel()
+ {
+ ItemName = "Item 1-1-2"
+ }
+ }
+ },
+ new TreeComboBoxItemViewModel()
+ {
+ ItemName = "Item 1-2"
+ }
+ }
+ },
+ new TreeComboBoxItemViewModel()
+ {
+ ItemName = "Item 2",
+ Children = new List()
+ {
+ new TreeComboBoxItemViewModel()
+ {
+ ItemName = "Item 2-1"
+ },
+ new TreeComboBoxItemViewModel()
+ {
+ ItemName = "Item 2-2"
+ }
+ }
+ },
+ new TreeComboBoxItemViewModel()
+ {
+ ItemName = "Item 3"
+ },
+ };
+ }
+}
+
+public partial class TreeComboBoxItemViewModel : ObservableObject
+{
+ [ObservableProperty] private string? _itemName;
+ public List Children { get; set; } = new ();
+}
\ No newline at end of file
diff --git a/demo/Ursa.Demo/ViewModels/VerificationCodeDemoViewModel.cs b/demo/Ursa.Demo/ViewModels/VerificationCodeDemoViewModel.cs
new file mode 100644
index 00000000..5de9705a
--- /dev/null
+++ b/demo/Ursa.Demo/ViewModels/VerificationCodeDemoViewModel.cs
@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using System.Windows.Input;
+using Avalonia.Collections;
+using CommunityToolkit.Mvvm.ComponentModel;
+using CommunityToolkit.Mvvm.Input;
+using Ursa.Controls;
+
+namespace Ursa.Demo.ViewModels;
+
+public partial class VerificationCodeDemoViewModel: ObservableObject
+{
+ public ICommand CompleteCommand { get; set; }
+ [ObservableProperty] private List? _error;
+
+ public VerificationCodeDemoViewModel()
+ {
+ CompleteCommand = new AsyncRelayCommand>(OnComplete);
+ Error = [new Exception("Invalid verification code")];
+ }
+
+ private async Task OnComplete(IList? obj)
+ {
+ if (obj is null) return;
+ var code = string.Join("", obj);
+ await MessageBox.ShowOverlayAsync(code);
+ }
+}
\ No newline at end of file
diff --git a/demo/Ursa.Demo/Views/MainView.axaml b/demo/Ursa.Demo/Views/MainView.axaml
index d20b8d45..65a654ac 100644
--- a/demo/Ursa.Demo/Views/MainView.axaml
+++ b/demo/Ursa.Demo/Views/MainView.axaml
@@ -20,21 +20,20 @@
+
+
+
-
-
-
+ Classes.Blur="{Binding $parent[u:UrsaWindow].(u:OverlayDialogHost.IsInModalStatus)}"
+ ColumnDefinitions="Auto, *" >
@@ -58,7 +57,7 @@
-
+
-
-
diff --git a/demo/Ursa.Demo/Views/MainWindow.axaml b/demo/Ursa.Demo/Views/MainWindow.axaml
index 054e043a..a6ee9ebf 100644
--- a/demo/Ursa.Demo/Views/MainWindow.axaml
+++ b/demo/Ursa.Demo/Views/MainWindow.axaml
@@ -1,17 +1,24 @@
-
+
+
+
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/demo/Ursa.Demo/Views/MainWindow.axaml.cs b/demo/Ursa.Demo/Views/MainWindow.axaml.cs
index 73e4f8af..f6466c32 100644
--- a/demo/Ursa.Demo/Views/MainWindow.axaml.cs
+++ b/demo/Ursa.Demo/Views/MainWindow.axaml.cs
@@ -1,9 +1,11 @@
+using System;
using Avalonia.Controls;
using Avalonia.Interactivity;
+using Ursa.Controls;
namespace Ursa.Demo.Views;
-public partial class MainWindow : Window
+public partial class MainWindow : UrsaWindow
{
public MainWindow()
{
diff --git a/demo/Ursa.Demo/Views/SingleView.axaml b/demo/Ursa.Demo/Views/SingleView.axaml
new file mode 100644
index 00000000..20659738
--- /dev/null
+++ b/demo/Ursa.Demo/Views/SingleView.axaml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
diff --git a/demo/Ursa.Demo/Views/SingleView.axaml.cs b/demo/Ursa.Demo/Views/SingleView.axaml.cs
new file mode 100644
index 00000000..7f65e889
--- /dev/null
+++ b/demo/Ursa.Demo/Views/SingleView.axaml.cs
@@ -0,0 +1,13 @@
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Markup.Xaml;
+
+namespace Ursa.Demo.Views;
+
+public partial class SingleView : UserControl
+{
+ public SingleView()
+ {
+ InitializeComponent();
+ }
+}
\ No newline at end of file
diff --git a/src/Package.props b/src/Package.props
index 0567ced9..de51260d 100644
--- a/src/Package.props
+++ b/src/Package.props
@@ -1,5 +1,5 @@
- 11.0.0
+ 11.1.0-rc2
\ No newline at end of file
diff --git a/src/Ursa.PrismExtension/Ursa.PrismExtension.csproj b/src/Ursa.PrismExtension/Ursa.PrismExtension.csproj
index 60277244..52fc6279 100644
--- a/src/Ursa.PrismExtension/Ursa.PrismExtension.csproj
+++ b/src/Ursa.PrismExtension/Ursa.PrismExtension.csproj
@@ -8,14 +8,16 @@
enable
latest
Irihi.Ursa.PrismExtension
+ irihi.png
-
+
-
+
+
diff --git a/src/Ursa.PrismExtension/irihi.png b/src/Ursa.PrismExtension/irihi.png
new file mode 100644
index 00000000..01c68d91
Binary files /dev/null and b/src/Ursa.PrismExtension/irihi.png differ
diff --git a/src/Ursa.Themes.Semi/Controls/Avatar.axaml b/src/Ursa.Themes.Semi/Controls/Avatar.axaml
new file mode 100644
index 00000000..4fe9705c
--- /dev/null
+++ b/src/Ursa.Themes.Semi/Controls/Avatar.axaml
@@ -0,0 +1,140 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Ursa.Themes.Semi/Controls/Breadcrumb.axaml b/src/Ursa.Themes.Semi/Controls/Breadcrumb.axaml
new file mode 100644
index 00000000..4df2747e
--- /dev/null
+++ b/src/Ursa.Themes.Semi/Controls/Breadcrumb.axaml
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Ursa.Themes.Semi/Controls/Calendar.axaml b/src/Ursa.Themes.Semi/Controls/Calendar.axaml
new file mode 100644
index 00000000..8cc7683c
--- /dev/null
+++ b/src/Ursa.Themes.Semi/Controls/Calendar.axaml
@@ -0,0 +1,291 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Ursa.Themes.Semi/Controls/Clock.axaml b/src/Ursa.Themes.Semi/Controls/Clock.axaml
new file mode 100644
index 00000000..58809b82
--- /dev/null
+++ b/src/Ursa.Themes.Semi/Controls/Clock.axaml
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Ursa.Themes.Semi/Controls/DatePicker.axaml b/src/Ursa.Themes.Semi/Controls/DatePicker.axaml
new file mode 100644
index 00000000..05c1357c
--- /dev/null
+++ b/src/Ursa.Themes.Semi/Controls/DatePicker.axaml
@@ -0,0 +1,126 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Ursa.Themes.Semi/Controls/DateRangePicker.axaml b/src/Ursa.Themes.Semi/Controls/DateRangePicker.axaml
new file mode 100644
index 00000000..019c573e
--- /dev/null
+++ b/src/Ursa.Themes.Semi/Controls/DateRangePicker.axaml
@@ -0,0 +1,172 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Ursa.Themes.Semi/Controls/Dialog.axaml b/src/Ursa.Themes.Semi/Controls/Dialog.axaml
index 59801513..6060c01f 100644
--- a/src/Ursa.Themes.Semi/Controls/Dialog.axaml
+++ b/src/Ursa.Themes.Semi/Controls/Dialog.axaml
@@ -18,7 +18,7 @@
+ Theme="{DynamicResource OverlayCloseButton}" />
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Ursa.Themes.Semi/Controls/Drawer.axaml b/src/Ursa.Themes.Semi/Controls/Drawer.axaml
index e397fcdf..28df5eae 100644
--- a/src/Ursa.Themes.Semi/Controls/Drawer.axaml
+++ b/src/Ursa.Themes.Semi/Controls/Drawer.axaml
@@ -35,7 +35,7 @@
Grid.Column="1"
Margin="0,24,24,0"
DockPanel.Dock="Right"
- Theme="{DynamicResource CloseButton}" />
+ Theme="{DynamicResource OverlayCloseButton}" />
@@ -107,7 +107,7 @@
Grid.Column="1"
Margin="0,24,24,0"
DockPanel.Dock="Right"
- Theme="{DynamicResource CloseButton}" />
+ Theme="{DynamicResource OverlayCloseButton}" />
+
diff --git a/src/Ursa.Themes.Semi/Controls/EnumSelector.axaml b/src/Ursa.Themes.Semi/Controls/EnumSelector.axaml
index 841aea30..163b6eed 100644
--- a/src/Ursa.Themes.Semi/Controls/EnumSelector.axaml
+++ b/src/Ursa.Themes.Semi/Controls/EnumSelector.axaml
@@ -4,12 +4,13 @@
xmlns:u="https://irihi.tech/ursa">
-
-
+
diff --git a/src/Ursa.Themes.Semi/Controls/Form.axaml b/src/Ursa.Themes.Semi/Controls/Form.axaml
index 039fa0e7..79b896dd 100644
--- a/src/Ursa.Themes.Semi/Controls/Form.axaml
+++ b/src/Ursa.Themes.Semi/Controls/Form.axaml
@@ -21,12 +21,18 @@
-
-
+
+
diff --git a/src/Ursa.Themes.Semi/Controls/MessageBox.axaml b/src/Ursa.Themes.Semi/Controls/MessageBox.axaml
index 05276287..ad58eadb 100644
--- a/src/Ursa.Themes.Semi/Controls/MessageBox.axaml
+++ b/src/Ursa.Themes.Semi/Controls/MessageBox.axaml
@@ -71,10 +71,10 @@
MaxHeight="300"
HorizontalScrollBarVisibility="Disabled"
VerticalScrollBarVisibility="Auto">
-
@@ -150,6 +150,7 @@
+
+ Theme="{DynamicResource OverlayCloseButton}" />
-
diff --git a/src/Ursa.Themes.Semi/Controls/MultiComboBox.axaml b/src/Ursa.Themes.Semi/Controls/MultiComboBox.axaml
new file mode 100644
index 00000000..df334e69
--- /dev/null
+++ b/src/Ursa.Themes.Semi/Controls/MultiComboBox.axaml
@@ -0,0 +1,272 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Ursa.Themes.Semi/Controls/NavMenu.axaml b/src/Ursa.Themes.Semi/Controls/NavMenu.axaml
index d769a302..f192e2da 100644
--- a/src/Ursa.Themes.Semi/Controls/NavMenu.axaml
+++ b/src/Ursa.Themes.Semi/Controls/NavMenu.axaml
@@ -16,10 +16,10 @@
@@ -51,6 +54,7 @@
Name="PART_Border"
Grid.Row="0"
MinHeight="32"
+ HorizontalAlignment="Stretch"
Background="{TemplateBinding u:NavMenuItem.Background}"
CornerRadius="4"
Cursor="Hand">
@@ -164,7 +168,7 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Ursa.Themes.Semi/Controls/NumericUpDown.axaml b/src/Ursa.Themes.Semi/Controls/NumericUpDown.axaml
index 31c1aa86..1efd0a21 100644
--- a/src/Ursa.Themes.Semi/Controls/NumericUpDown.axaml
+++ b/src/Ursa.Themes.Semi/Controls/NumericUpDown.axaml
@@ -3,7 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:u="https://irihi.tech/ursa">
-
+
@@ -23,7 +23,7 @@
-
+
@@ -38,20 +38,21 @@
AllowSpin="{TemplateBinding AllowSpin}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}">
+ BorderThickness="{TemplateBinding BorderThickness}"
+ ShowButtonSpinner="{TemplateBinding ShowButtonSpinner}">
+ Cursor="SizeAll"/>
-
+
diff --git a/src/Ursa.Themes.Semi/Controls/Rating.axaml b/src/Ursa.Themes.Semi/Controls/Rating.axaml
new file mode 100644
index 00000000..6a914113
--- /dev/null
+++ b/src/Ursa.Themes.Semi/Controls/Rating.axaml
@@ -0,0 +1,78 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Ursa.Themes.Semi/Controls/ScrollToButton.axaml b/src/Ursa.Themes.Semi/Controls/ScrollToButton.axaml
new file mode 100644
index 00000000..dc205d09
--- /dev/null
+++ b/src/Ursa.Themes.Semi/Controls/ScrollToButton.axaml
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Ursa.Themes.Semi/Controls/TagInput.axaml b/src/Ursa.Themes.Semi/Controls/TagInput.axaml
index 68298700..f15bf935 100644
--- a/src/Ursa.Themes.Semi/Controls/TagInput.axaml
+++ b/src/Ursa.Themes.Semi/Controls/TagInput.axaml
@@ -25,6 +25,12 @@
BorderThickness="1"
CornerRadius="3">
+
-
+
-
@@ -121,11 +130,12 @@
Data="{DynamicResource ClosableTagCloseIconGlyph}"
DockPanel.Dock="Right"
Foreground="{TemplateBinding Foreground}" />
-
diff --git a/src/Ursa.Themes.Semi/Controls/TextBox.axaml b/src/Ursa.Themes.Semi/Controls/TextBox.axaml
new file mode 100644
index 00000000..806a0e52
--- /dev/null
+++ b/src/Ursa.Themes.Semi/Controls/TextBox.axaml
@@ -0,0 +1,79 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Ursa.Themes.Semi/Controls/ThemeSelector.axaml b/src/Ursa.Themes.Semi/Controls/ThemeSelector.axaml
index d9a22d4a..228b4cb8 100644
--- a/src/Ursa.Themes.Semi/Controls/ThemeSelector.axaml
+++ b/src/Ursa.Themes.Semi/Controls/ThemeSelector.axaml
@@ -5,26 +5,31 @@
-
-
-
-
-
-
-
-
+
+
+
+
diff --git a/src/Ursa.Themes.Semi/Controls/TimeBox.axaml b/src/Ursa.Themes.Semi/Controls/TimeBox.axaml
new file mode 100644
index 00000000..479b100a
--- /dev/null
+++ b/src/Ursa.Themes.Semi/Controls/TimeBox.axaml
@@ -0,0 +1,155 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Ursa.Themes.Semi/Controls/TimePicker.axaml b/src/Ursa.Themes.Semi/Controls/TimePicker.axaml
new file mode 100644
index 00000000..14c5b6b5
--- /dev/null
+++ b/src/Ursa.Themes.Semi/Controls/TimePicker.axaml
@@ -0,0 +1,246 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Ursa.Themes.Semi/Controls/TimeRangePicker.axaml b/src/Ursa.Themes.Semi/Controls/TimeRangePicker.axaml
new file mode 100644
index 00000000..b95972e3
--- /dev/null
+++ b/src/Ursa.Themes.Semi/Controls/TimeRangePicker.axaml
@@ -0,0 +1,199 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Ursa.Themes.Semi/Controls/ToolBar.axaml b/src/Ursa.Themes.Semi/Controls/ToolBar.axaml
index 9fe7cfbb..90746f16 100644
--- a/src/Ursa.Themes.Semi/Controls/ToolBar.axaml
+++ b/src/Ursa.Themes.Semi/Controls/ToolBar.axaml
@@ -28,6 +28,7 @@
+
@@ -36,12 +37,14 @@
+ CornerRadius="4">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Ursa.Themes.Semi/Controls/UrsaWindow.axaml b/src/Ursa.Themes.Semi/Controls/UrsaWindow.axaml
new file mode 100644
index 00000000..3282c9df
--- /dev/null
+++ b/src/Ursa.Themes.Semi/Controls/UrsaWindow.axaml
@@ -0,0 +1,155 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Full
+
+
+ Full
+
+
+ None
+
+
+ Full
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Ursa.Themes.Semi/Controls/VerificationCode.axaml b/src/Ursa.Themes.Semi/Controls/VerificationCode.axaml
new file mode 100644
index 00000000..ae38a545
--- /dev/null
+++ b/src/Ursa.Themes.Semi/Controls/VerificationCode.axaml
@@ -0,0 +1,80 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Ursa.Themes.Semi/Controls/_index.axaml b/src/Ursa.Themes.Semi/Controls/_index.axaml
index 21d39098..03450443 100644
--- a/src/Ursa.Themes.Semi/Controls/_index.axaml
+++ b/src/Ursa.Themes.Semi/Controls/_index.axaml
@@ -1,16 +1,23 @@
+
+
+
+
+
+
+
@@ -19,17 +26,28 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Ursa.Themes.Semi/Converters/ClockHandLengthConverter.cs b/src/Ursa.Themes.Semi/Converters/ClockHandLengthConverter.cs
new file mode 100644
index 00000000..6715eefa
--- /dev/null
+++ b/src/Ursa.Themes.Semi/Converters/ClockHandLengthConverter.cs
@@ -0,0 +1,27 @@
+using System.Globalization;
+using Avalonia.Data.Converters;
+
+namespace Ursa.Themes.Semi.Converters;
+
+public class ClockHandLengthConverter(double ratio) : IValueConverter
+{
+ public static ClockHandLengthConverter Hour { get; } = new(1-0.618);
+ public static ClockHandLengthConverter Minute { get; } = new(0.618);
+ public static ClockHandLengthConverter Second { get; } = new(1);
+
+ private double _ratio = ratio;
+
+ public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
+ {
+ if (value is double d)
+ {
+ return d * ratio / 2;
+ }
+ return 0.0;
+ }
+
+ public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+}
\ No newline at end of file
diff --git a/src/Ursa.Themes.Semi/Index.axaml.cs b/src/Ursa.Themes.Semi/Index.axaml.cs
index a0eeea49..eec6fa7f 100644
--- a/src/Ursa.Themes.Semi/Index.axaml.cs
+++ b/src/Ursa.Themes.Semi/Index.axaml.cs
@@ -1,21 +1,23 @@
using System.Globalization;
-using System.Runtime.CompilerServices;
-using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
-using Avalonia.Markup.Xaml.Styling;
-using Avalonia.Platform;
using Avalonia.Styling;
namespace Ursa.Themes.Semi;
+///
+/// Notice: Don't set Locale if your app is in InvariantGlobalization mode.
+///
public class SemiTheme: Styles
{
- private static readonly Dictionary _localeToResource = new()
- {
- { new CultureInfo("zh-CN"), "avares://Ursa.Themes.Semi/Locale/zh-CN.axaml" },
- { new CultureInfo("en-US"), "avares://Ursa.Themes.Semi/Locale/en-US.axaml" },
- };
+ private static readonly Lazy> _localeToResource = new Lazy>(
+ () => new Dictionary
+ {
+ { new CultureInfo("zh-CN"), "avares://Ursa.Themes.Semi/Locale/zh-CN.axaml" },
+ { new CultureInfo("en-US"), "avares://Ursa.Themes.Semi/Locale/en-US.axaml" },
+ });
+
+ private static readonly string _defaultResource = "avares://Ursa.Themes.Semi/Locale/zh-CN.axaml";
private readonly IServiceProvider? sp;
public SemiTheme(IServiceProvider? provider = null)
@@ -29,29 +31,40 @@ public CultureInfo? Locale
{
get => _locale;
set
- {
- _locale = value;
- var resource = TryGetLocaleResource(value);
- var d = AvaloniaXamlLoader.Load(sp, new Uri(resource)) as ResourceDictionary;
- if (d is null) return;
- foreach (var kv in d)
+ {
+ try
{
- this.Resources.Add(kv);
+ _locale = value;
+ var resource = TryGetLocaleResource(value);
+ var d = AvaloniaXamlLoader.Load(sp, new Uri(resource)) as ResourceDictionary;
+ if (d is null) return;
+ foreach (var kv in d)
+ {
+ this.Resources.Add(kv);
+ }
}
+ catch
+ {
+ _locale = CultureInfo.InvariantCulture;
+ }
+
}
}
private static string TryGetLocaleResource(CultureInfo? locale)
{
+ if (Equals(locale, CultureInfo.InvariantCulture))
+ {
+ return _defaultResource;
+ }
if (locale is null)
{
- return _localeToResource[new CultureInfo("zh-CN")];
+ return _localeToResource.Value[new CultureInfo("zh-CN")];
}
-
- if (_localeToResource.TryGetValue(locale, out var resource))
+ if (_localeToResource.Value.TryGetValue(locale, out var resource))
{
return resource;
}
- return _localeToResource[new CultureInfo("zh-CN")];
+ return _localeToResource.Value[new CultureInfo("zh-CN")];
}
}
\ No newline at end of file
diff --git a/src/Ursa.Themes.Semi/Locale/en-us.axaml b/src/Ursa.Themes.Semi/Locale/en-us.axaml
index e6d2f69e..5f2389bb 100644
--- a/src/Ursa.Themes.Semi/Locale/en-us.axaml
+++ b/src/Ursa.Themes.Semi/Locale/en-us.axaml
@@ -10,4 +10,12 @@
Yes
No
Close
+ Jump to page
+
+ Dark
+ Light
+ System
+ Confirm
+ Start Time
+ End Time
diff --git a/src/Ursa.Themes.Semi/Locale/zh-cn.axaml b/src/Ursa.Themes.Semi/Locale/zh-cn.axaml
index c738313e..94d2f9ea 100644
--- a/src/Ursa.Themes.Semi/Locale/zh-cn.axaml
+++ b/src/Ursa.Themes.Semi/Locale/zh-cn.axaml
@@ -10,4 +10,12 @@
是
否
关闭
+ 跳至
+ 页
+ 暗色
+ 亮色
+ 跟随系统
+ 确认
+ 开始时间
+ 结束时间
diff --git a/src/Ursa.Themes.Semi/Styles/Breadcrumb.axaml b/src/Ursa.Themes.Semi/Styles/Breadcrumb.axaml
new file mode 100644
index 00000000..66e67062
--- /dev/null
+++ b/src/Ursa.Themes.Semi/Styles/Breadcrumb.axaml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Ursa.Themes.Semi/Styles/TimeBox.axaml b/src/Ursa.Themes.Semi/Styles/TimeBox.axaml
new file mode 100644
index 00000000..cab7e70c
--- /dev/null
+++ b/src/Ursa.Themes.Semi/Styles/TimeBox.axaml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Ursa.Themes.Semi/Styles/_index.axaml b/src/Ursa.Themes.Semi/Styles/_index.axaml
index e3cc6668..868fad8d 100644
--- a/src/Ursa.Themes.Semi/Styles/_index.axaml
+++ b/src/Ursa.Themes.Semi/Styles/_index.axaml
@@ -4,8 +4,10 @@
+
+
diff --git a/src/Ursa.Themes.Semi/Themes/Dark/Avatar.axaml b/src/Ursa.Themes.Semi/Themes/Dark/Avatar.axaml
new file mode 100644
index 00000000..53516aa3
--- /dev/null
+++ b/src/Ursa.Themes.Semi/Themes/Dark/Avatar.axaml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Ursa.Themes.Semi/Themes/Dark/ButtonGroup.axaml b/src/Ursa.Themes.Semi/Themes/Dark/ButtonGroup.axaml
index 6ae7f409..9c55ccdc 100644
--- a/src/Ursa.Themes.Semi/Themes/Dark/ButtonGroup.axaml
+++ b/src/Ursa.Themes.Semi/Themes/Dark/ButtonGroup.axaml
@@ -1,5 +1,7 @@
+
+
diff --git a/src/Ursa.Themes.Semi/Themes/Dark/DatePicker.axaml b/src/Ursa.Themes.Semi/Themes/Dark/DatePicker.axaml
new file mode 100644
index 00000000..663edbdb
--- /dev/null
+++ b/src/Ursa.Themes.Semi/Themes/Dark/DatePicker.axaml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Ursa.Themes.Semi/Themes/Dark/Rating.axaml b/src/Ursa.Themes.Semi/Themes/Dark/Rating.axaml
new file mode 100644
index 00000000..f0cc810a
--- /dev/null
+++ b/src/Ursa.Themes.Semi/Themes/Dark/Rating.axaml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/src/Ursa.Themes.Semi/Themes/Dark/TimeBox.axaml b/src/Ursa.Themes.Semi/Themes/Dark/TimeBox.axaml
new file mode 100644
index 00000000..7caba956
--- /dev/null
+++ b/src/Ursa.Themes.Semi/Themes/Dark/TimeBox.axaml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Ursa.Themes.Semi/Themes/Dark/_index.axaml b/src/Ursa.Themes.Semi/Themes/Dark/_index.axaml
index 63d0c66e..91ca1597 100644
--- a/src/Ursa.Themes.Semi/Themes/Dark/_index.axaml
+++ b/src/Ursa.Themes.Semi/Themes/Dark/_index.axaml
@@ -1,9 +1,10 @@
-
+
+
@@ -12,8 +13,10 @@
+
+
-
+
\ No newline at end of file
diff --git a/src/Ursa.Themes.Semi/Themes/Light/Avatar.axaml b/src/Ursa.Themes.Semi/Themes/Light/Avatar.axaml
new file mode 100644
index 00000000..9080891b
--- /dev/null
+++ b/src/Ursa.Themes.Semi/Themes/Light/Avatar.axaml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Ursa.Themes.Semi/Themes/Light/DatePicker.axaml b/src/Ursa.Themes.Semi/Themes/Light/DatePicker.axaml
new file mode 100644
index 00000000..23fad7a5
--- /dev/null
+++ b/src/Ursa.Themes.Semi/Themes/Light/DatePicker.axaml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Ursa.Themes.Semi/Themes/Light/Rating.axaml b/src/Ursa.Themes.Semi/Themes/Light/Rating.axaml
new file mode 100644
index 00000000..ddb703ac
--- /dev/null
+++ b/src/Ursa.Themes.Semi/Themes/Light/Rating.axaml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/src/Ursa.Themes.Semi/Themes/Light/TimeBox.axaml b/src/Ursa.Themes.Semi/Themes/Light/TimeBox.axaml
new file mode 100644
index 00000000..ed693758
--- /dev/null
+++ b/src/Ursa.Themes.Semi/Themes/Light/TimeBox.axaml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Ursa.Themes.Semi/Themes/Light/_index.axaml b/src/Ursa.Themes.Semi/Themes/Light/_index.axaml
index 63d0c66e..91ca1597 100644
--- a/src/Ursa.Themes.Semi/Themes/Light/_index.axaml
+++ b/src/Ursa.Themes.Semi/Themes/Light/_index.axaml
@@ -1,9 +1,10 @@
-
+
+
@@ -12,8 +13,10 @@
+
+
-
+
\ No newline at end of file
diff --git a/src/Ursa.Themes.Semi/Themes/Shared/Avatar.axaml b/src/Ursa.Themes.Semi/Themes/Shared/Avatar.axaml
new file mode 100644
index 00000000..ebd81a4e
--- /dev/null
+++ b/src/Ursa.Themes.Semi/Themes/Shared/Avatar.axaml
@@ -0,0 +1,29 @@
+
+ 600
+ 100
+
+ 3
+
+ 20
+ 10
+
+ 24
+ 10
+
+ 32
+ 12
+
+ 40
+ 18
+
+ 48
+ 20
+
+ 72
+ 32
+ 6
+
+ 128
+ 64
+ 12
+
\ No newline at end of file
diff --git a/src/Ursa.Themes.Semi/Themes/Shared/Banner.axaml b/src/Ursa.Themes.Semi/Themes/Shared/Banner.axaml
index 641d8063..4b6337ea 100644
--- a/src/Ursa.Themes.Semi/Themes/Shared/Banner.axaml
+++ b/src/Ursa.Themes.Semi/Themes/Shared/Banner.axaml
@@ -1,10 +1,10 @@
- M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23ZM14 7C14 8.10457 13.1046 9 12 9C10.8954 9 10 8.10457 10 7C10 5.89543 10.8954 5 12 5C13.1046 5 14 5.89543 14 7ZM9 10.75C9 10.3358 9.33579 10 9.75 10H12.5C13.0523 10 13.5 10.4477 13.5 11V16.5H14.25C14.6642 16.5 15 16.8358 15 17.25C15 17.6642 14.6642 18 14.25 18H9.75C9.33579 18 9 17.6642 9 17.25C9 16.8358 9.33579 16.5 9.75 16.5H10.5V11.5H9.75C9.33579 11.5 9 11.1642 9 10.75Z
- M23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12C1 5.92487 5.92487 1 12 1C18.0751 1 23 5.92487 23 12ZM13.5 17.5C13.5 16.6716 12.8284 16 12 16C11.1716 16 10.5 16.6716 10.5 17.5C10.5 18.3284 11.1716 19 12 19C12.8284 19 13.5 18.3284 13.5 17.5ZM12 5C10.9138 5 10.0507 5.91244 10.1109 6.99692L10.4168 12.5023C10.4635 13.3426 11.1584 14 12 14C12.8416 14 13.5365 13.3426 13.5832 12.5023L13.8891 6.99692C13.9493 5.91244 13.0862 5 12 5Z
- M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23ZM17.8831 9.82235L11.6854 17.4112C11.4029 17.7806 10.965 17.9981 10.5 18C10.035 18.0019 9.59533 17.788 9.30982 17.421L5.81604 13.4209C5.30744 12.767 5.42524 11.8246 6.07916 11.316C6.73308 10.8074 7.67549 10.9252 8.1841 11.5791L10.4838 14.0439L15.5 8C16.0032 7.34193 16.9446 7.21641 17.6027 7.71964C18.2608 8.22287 18.3863 9.16428 17.8831 9.82235Z
- M10.2268 2.3986L1.52616 19.0749C0.831449 20.4064 1.79747 22 3.29933 22H20.7007C22.2025 22 23.1686 20.4064 22.4739 19.0749L13.7732 2.3986C13.0254 0.965441 10.9746 0.965442 10.2268 2.3986ZM13.1415 14.0101C13.0603 14.5781 12.5739 15 12.0001 15C11.4263 15 10.9398 14.5781 10.8586 14.0101L10.2829 9.97992C10.1336 8.93495 10.9445 8.00002 12.0001 8.00002C13.0556 8.00002 13.8665 8.93495 13.7172 9.97992L13.1415 14.0101ZM13.5001 18.5C13.5001 19.3284 12.8285 20 12.0001 20C11.1716 20 10.5001 19.3284 10.5001 18.5C10.5001 17.6716 11.1716 17 12.0001 17C12.8285 17 13.5001 17.6716 13.5001 18.5Z
- M 17.6568 19.7782 C 18.2426 20.3639 19.1924 20.3639 19.7782 19.7782 C 20.3639 19.1924 20.3639 18.2426 19.7782 17.6568 L 14.1213 12 L 19.7782 6.34313 C 20.3639 5.75734 20.3639 4.8076 19.7782 4.22181 C 19.1924 3.63602 18.2426 3.63602 17.6568 4.22181 L 12 9.87866 L 6.34313 4.22181 C 5.75734 3.63602 4.8076 3.63602 4.22181 4.22181 C 3.63602 4.8076 3.63602 5.75734 4.22181 6.34313 L 9.87866 12 L 4.22181 17.6568 C 3.63602 18.2426 3.63602 19.1924 4.22181 19.7782 C 4.8076 20.3639 5.75734 20.3639 6.34313 19.7782 L 12 14.1213 L 17.6568 19.7782 Z
+ M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23ZM14 7C14 8.10457 13.1046 9 12 9C10.8954 9 10 8.10457 10 7C10 5.89543 10.8954 5 12 5C13.1046 5 14 5.89543 14 7ZM9 10.75C9 10.3358 9.33579 10 9.75 10H12.5C13.0523 10 13.5 10.4477 13.5 11V16.5H14.25C14.6642 16.5 15 16.8358 15 17.25C15 17.6642 14.6642 18 14.25 18H9.75C9.33579 18 9 17.6642 9 17.25C9 16.8358 9.33579 16.5 9.75 16.5H10.5V11.5H9.75C9.33579 11.5 9 11.1642 9 10.75Z
+ M23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12C1 5.92487 5.92487 1 12 1C18.0751 1 23 5.92487 23 12ZM13.5 17.5C13.5 16.6716 12.8284 16 12 16C11.1716 16 10.5 16.6716 10.5 17.5C10.5 18.3284 11.1716 19 12 19C12.8284 19 13.5 18.3284 13.5 17.5ZM12 5C10.9138 5 10.0507 5.91244 10.1109 6.99692L10.4168 12.5023C10.4635 13.3426 11.1584 14 12 14C12.8416 14 13.5365 13.3426 13.5832 12.5023L13.8891 6.99692C13.9493 5.91244 13.0862 5 12 5Z
+ M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23ZM17.8831 9.82235L11.6854 17.4112C11.4029 17.7806 10.965 17.9981 10.5 18C10.035 18.0019 9.59533 17.788 9.30982 17.421L5.81604 13.4209C5.30744 12.767 5.42524 11.8246 6.07916 11.316C6.73308 10.8074 7.67549 10.9252 8.1841 11.5791L10.4838 14.0439L15.5 8C16.0032 7.34193 16.9446 7.21641 17.6027 7.71964C18.2608 8.22287 18.3863 9.16428 17.8831 9.82235Z
+ M10.2268 2.3986L1.52616 19.0749C0.831449 20.4064 1.79747 22 3.29933 22H20.7007C22.2025 22 23.1686 20.4064 22.4739 19.0749L13.7732 2.3986C13.0254 0.965441 10.9746 0.965442 10.2268 2.3986ZM13.1415 14.0101C13.0603 14.5781 12.5739 15 12.0001 15C11.4263 15 10.9398 14.5781 10.8586 14.0101L10.2829 9.97992C10.1336 8.93495 10.9445 8.00002 12.0001 8.00002C13.0556 8.00002 13.8665 8.93495 13.7172 9.97992L13.1415 14.0101ZM13.5001 18.5C13.5001 19.3284 12.8285 20 12.0001 20C11.1716 20 10.5001 19.3284 10.5001 18.5C10.5001 17.6716 11.1716 17 12.0001 17C12.8285 17 13.5001 17.6716 13.5001 18.5Z
+ M 17.6568 19.7782 C 18.2426 20.3639 19.1924 20.3639 19.7782 19.7782 C 20.3639 19.1924 20.3639 18.2426 19.7782 17.6568 L 14.1213 12 L 19.7782 6.34313 C 20.3639 5.75734 20.3639 4.8076 19.7782 4.22181 C 19.1924 3.63602 18.2426 3.63602 17.6568 4.22181 L 12 9.87866 L 6.34313 4.22181 C 5.75734 3.63602 4.8076 3.63602 4.22181 4.22181 C 3.63602 4.8076 3.63602 5.75734 4.22181 6.34313 L 9.87866 12 L 4.22181 17.6568 C 3.63602 18.2426 3.63602 19.1924 4.22181 19.7782 C 4.8076 20.3639 5.75734 20.3639 6.34313 19.7782 L 12 14.1213 L 17.6568 19.7782 Z
3
1
diff --git a/src/Ursa.Themes.Semi/Themes/Shared/DatePicker.axaml b/src/Ursa.Themes.Semi/Themes/Shared/DatePicker.axaml
new file mode 100644
index 00000000..0cfcfe68
--- /dev/null
+++ b/src/Ursa.Themes.Semi/Themes/Shared/DatePicker.axaml
@@ -0,0 +1,30 @@
+
+
+ 32
+ 32
+ 0 2
+ 1
+ 3
+
+ 0
+ 0
+
+ 3 0 0 3
+ 0 3 3 0
+
+
+ 32
+ 32
+ 0 2
+ 1
+ 3
+ 0
+
+
+ 260
+ 260
+ 12
+ 12
+ M12.6185 4.39653C13.1272 4.92524 13.1272 5.78245 12.6185 6.31116L7.14483 12L12.6185 17.6888C13.1272 18.2176 13.1272 19.0748 12.6185 19.6035C12.1098 20.1322 11.285 20.1322 10.7763 19.6035L4.38153 12.9573C3.87282 12.4286 3.87282 11.5714 4.38153 11.0427L10.7763 4.39653C11.285 3.86782 12.1098 3.86782 12.6185 4.39653Z M19.6185 4.39653C20.1272 4.92524 20.1272 5.78245 19.6185 6.31116L14.1448 12L19.6185 17.6888C20.1272 18.2176 20.1272 19.0748 19.6185 19.6035C19.1098 20.1322 18.285 20.1322 17.7763 19.6035L11.3815 12.9573C10.8728 12.4286 10.8728 11.5714 11.3815 11.0427L17.7763 4.39653C18.285 3.86782 19.1098 3.86782 19.6185 4.39653Z
+ M4.38153 4.39653C4.89024 3.86782 5.71502 3.86782 6.22373 4.39653L12.6185 11.0427C13.1272 11.5714 13.1272 12.4286 12.6185 12.9573L6.22373 19.6035C5.71502 20.1322 4.89024 20.1322 4.38153 19.6035C3.87282 19.0748 3.87282 18.2176 4.38153 17.6888L9.85517 12L4.38153 6.31116C3.87282 5.78245 3.87282 4.92524 4.38153 4.39653Z M11.3815 4.39653C11.8902 3.86782 12.715 3.86782 13.2237 4.39653L19.6185 11.0427C20.1272 11.5714 20.1272 12.4286 19.6185 12.9573L13.2237 19.6035C12.715 20.1322 11.8902 20.1322 11.3815 19.6035C10.8728 19.0748 10.8728 18.2176 11.3815 17.6888L16.8552 12L11.3815 6.31116C10.8728 5.78245 10.8728 4.92524 11.3815 4.39653Z
+
\ No newline at end of file
diff --git a/src/Ursa.Themes.Semi/Themes/Shared/Pagination.axaml b/src/Ursa.Themes.Semi/Themes/Shared/Pagination.axaml
index 83c83a65..cbb08962 100644
--- a/src/Ursa.Themes.Semi/Themes/Shared/Pagination.axaml
+++ b/src/Ursa.Themes.Semi/Themes/Shared/Pagination.axaml
@@ -1,8 +1,8 @@
- M12.6185 4.39653C13.1272 4.92524 13.1272 5.78245 12.6185 6.31116L7.14483 12L12.6185 17.6888C13.1272 18.2176 13.1272 19.0748 12.6185 19.6035C12.1098 20.1322 11.285 20.1322 10.7763 19.6035L4.38153 12.9573C3.87282 12.4286 3.87282 11.5714 4.38153 11.0427L10.7763 4.39653C11.285 3.86782 12.1098 3.86782 12.6185 4.39653Z M19.6185 4.39653C20.1272 4.92524 20.1272 5.78245 19.6185 6.31116L14.1448 12L19.6185 17.6888C20.1272 18.2176 20.1272 19.0748 19.6185 19.6035C19.1098 20.1322 18.285 20.1322 17.7763 19.6035L11.3815 12.9573C10.8728 12.4286 10.8728 11.5714 11.3815 11.0427L17.7763 4.39653C18.285 3.86782 19.1098 3.86782 19.6185 4.39653Z
- M4.38153 4.39653C4.89024 3.86782 5.71502 3.86782 6.22373 4.39653L12.6185 11.0427C13.1272 11.5714 13.1272 12.4286 12.6185 12.9573L6.22373 19.6035C5.71502 20.1322 4.89024 20.1322 4.38153 19.6035C3.87282 19.0748 3.87282 18.2176 4.38153 17.6888L9.85517 12L4.38153 6.31116C3.87282 5.78245 3.87282 4.92524 4.38153 4.39653Z M11.3815 4.39653C11.8902 3.86782 12.715 3.86782 13.2237 4.39653L19.6185 11.0427C20.1272 11.5714 20.1272 12.4286 19.6185 12.9573L13.2237 19.6035C12.715 20.1322 11.8902 20.1322 11.3815 19.6035C10.8728 19.0748 10.8728 18.2176 11.3815 17.6888L16.8552 12L11.3815 6.31116C10.8728 5.78245 10.8728 4.92524 11.3815 4.39653Z
- M7.43934 19.7957C6.85355 19.2099 6.85355 18.2601 7.43934 17.6744L13.0962 12.0175L7.43934 6.36065C6.85355 5.77486 6.85355 4.82511 7.43934 4.23933C8.02513 3.65354 8.97487 3.65354 9.56066 4.23933L16.2782 10.9568C16.864 11.5426 16.864 12.4924 16.2782 13.0782L9.56066 19.7957C8.97487 20.3815 8.02513 20.3815 7.43934 19.7957Z
- M16.2782 4.23933C16.864 4.82511 16.864 5.77486 16.2782 6.36065L10.6213 12.0175L16.2782 17.6744C16.864 18.2601 16.864 19.2099 16.2782 19.7957C15.6924 20.3815 14.7426 20.3815 14.1569 19.7957L7.43934 13.0782C6.85355 12.4924 6.85355 11.5426 7.43934 10.9568L14.1569 4.23933C14.7426 3.65354 15.6924 3.65354 16.2782 4.23933Z
- M7 12C7 13.3807 5.88071 14.5 4.5 14.5C3.11929 14.5 2 13.3807 2 12C2 10.6193 3.11929 9.5 4.5 9.5C5.88071 9.5 7 10.6193 7 12Z M14.5 12C14.5 13.3807 13.3807 14.5 12 14.5C10.6193 14.5 9.5 13.3807 9.5 12C9.5 10.6193 10.6193 9.5 12 9.5C13.3807 9.5 14.5 10.6193 14.5 12Z M19.5 14.5C20.8807 14.5 22 13.3807 22 12C22 10.6193 20.8807 9.5 19.5 9.5C18.1193 9.5 17 10.6193 17 12C17 13.3807 18.1193 14.5 19.5 14.5Z
+ M12.6185 4.39653C13.1272 4.92524 13.1272 5.78245 12.6185 6.31116L7.14483 12L12.6185 17.6888C13.1272 18.2176 13.1272 19.0748 12.6185 19.6035C12.1098 20.1322 11.285 20.1322 10.7763 19.6035L4.38153 12.9573C3.87282 12.4286 3.87282 11.5714 4.38153 11.0427L10.7763 4.39653C11.285 3.86782 12.1098 3.86782 12.6185 4.39653Z M19.6185 4.39653C20.1272 4.92524 20.1272 5.78245 19.6185 6.31116L14.1448 12L19.6185 17.6888C20.1272 18.2176 20.1272 19.0748 19.6185 19.6035C19.1098 20.1322 18.285 20.1322 17.7763 19.6035L11.3815 12.9573C10.8728 12.4286 10.8728 11.5714 11.3815 11.0427L17.7763 4.39653C18.285 3.86782 19.1098 3.86782 19.6185 4.39653Z
+ M4.38153 4.39653C4.89024 3.86782 5.71502 3.86782 6.22373 4.39653L12.6185 11.0427C13.1272 11.5714 13.1272 12.4286 12.6185 12.9573L6.22373 19.6035C5.71502 20.1322 4.89024 20.1322 4.38153 19.6035C3.87282 19.0748 3.87282 18.2176 4.38153 17.6888L9.85517 12L4.38153 6.31116C3.87282 5.78245 3.87282 4.92524 4.38153 4.39653Z M11.3815 4.39653C11.8902 3.86782 12.715 3.86782 13.2237 4.39653L19.6185 11.0427C20.1272 11.5714 20.1272 12.4286 19.6185 12.9573L13.2237 19.6035C12.715 20.1322 11.8902 20.1322 11.3815 19.6035C10.8728 19.0748 10.8728 18.2176 11.3815 17.6888L16.8552 12L11.3815 6.31116C10.8728 5.78245 10.8728 4.92524 11.3815 4.39653Z
+ M7.43934 19.7957C6.85355 19.2099 6.85355 18.2601 7.43934 17.6744L13.0962 12.0175L7.43934 6.36065C6.85355 5.77486 6.85355 4.82511 7.43934 4.23933C8.02513 3.65354 8.97487 3.65354 9.56066 4.23933L16.2782 10.9568C16.864 11.5426 16.864 12.4924 16.2782 13.0782L9.56066 19.7957C8.97487 20.3815 8.02513 20.3815 7.43934 19.7957Z
+ M16.2782 4.23933C16.864 4.82511 16.864 5.77486 16.2782 6.36065L10.6213 12.0175L16.2782 17.6744C16.864 18.2601 16.864 19.2099 16.2782 19.7957C15.6924 20.3815 14.7426 20.3815 14.1569 19.7957L7.43934 13.0782C6.85355 12.4924 6.85355 11.5426 7.43934 10.9568L14.1569 4.23933C14.7426 3.65354 15.6924 3.65354 16.2782 4.23933Z
+ M7 12C7 13.3807 5.88071 14.5 4.5 14.5C3.11929 14.5 2 13.3807 2 12C2 10.6193 3.11929 9.5 4.5 9.5C5.88071 9.5 7 10.6193 7 12Z M14.5 12C14.5 13.3807 13.3807 14.5 12 14.5C10.6193 14.5 9.5 13.3807 9.5 12C9.5 10.6193 10.6193 9.5 12 9.5C13.3807 9.5 14.5 10.6193 14.5 12Z M19.5 14.5C20.8807 14.5 22 13.3807 22 12C22 10.6193 20.8807 9.5 19.5 9.5C18.1193 9.5 17 10.6193 17 12C17 13.3807 18.1193 14.5 19.5 14.5Z
diff --git a/src/Ursa.Themes.Semi/Themes/Shared/Rating.axaml b/src/Ursa.Themes.Semi/Themes/Shared/Rating.axaml
new file mode 100644
index 00000000..5065bb69
--- /dev/null
+++ b/src/Ursa.Themes.Semi/Themes/Shared/Rating.axaml
@@ -0,0 +1,6 @@
+
+ 24
+ 16
+ 3 4
+ M10.7525 1.90411C11.1451 0.698628 12.8549 0.698631 13.2475 1.90411L15.2395 8.01946H21.6858C22.9565 8.01946 23.4848 9.64143 22.4568 10.3865L17.2417 14.1659L19.2337 20.2813C19.6263 21.4868 18.2431 22.4892 17.2151 21.7442L12 17.9647L6.78489 21.7442C5.75687 22.4892 4.37368 21.4868 4.76635 20.2813L6.75834 14.1659L1.54323 10.3865C0.515206 9.64142 1.04354 8.01946 2.31425 8.01946H8.76048L10.7525 1.90411Z
+
\ No newline at end of file
diff --git a/src/Ursa.Themes.Semi/Themes/Shared/ScrollToButton.axaml b/src/Ursa.Themes.Semi/Themes/Shared/ScrollToButton.axaml
new file mode 100644
index 00000000..4e453213
--- /dev/null
+++ b/src/Ursa.Themes.Semi/Themes/Shared/ScrollToButton.axaml
@@ -0,0 +1,5 @@
+
+
+ M19.637 16.4369C19.0513 17.0227 18.1015 17.0227 17.5157 16.4369L11.8589 10.7801L6.20202 16.4369C5.61623 17.0227 4.66648 17.0227 4.0807 16.4369C3.49491 15.8511 3.49491 14.9014 4.0807 14.3156L10.7982 7.59809C11.384 7.01231 12.3337 7.01231 12.9195 7.59809L19.637 14.3156C20.2228 14.9014 20.2228 15.8511 19.637 16.4369Z
+
diff --git a/src/Ursa.Themes.Semi/Themes/Shared/TagInput.axaml b/src/Ursa.Themes.Semi/Themes/Shared/TagInput.axaml
index 2f3d2b76..bfc84519 100644
--- a/src/Ursa.Themes.Semi/Themes/Shared/TagInput.axaml
+++ b/src/Ursa.Themes.Semi/Themes/Shared/TagInput.axaml
@@ -1,5 +1,5 @@
- M17.6568 19.7782C18.2426 20.3639 19.1924 20.3639 19.7782 19.7782C20.3639 19.1924 20.3639 18.2426 19.7782 17.6568L14.1213 12L19.7782 6.34313C20.3639 5.75734 20.3639 4.8076 19.7782 4.22181C19.1924 3.63602 18.2426 3.63602 17.6568 4.22181L12 9.87866L6.34313 4.22181C5.75734 3.63602 4.8076 3.63602 4.22181 4.22181C3.63602 4.8076 3.63602 5.75734 4.22181 6.34313L9.87866 12L4.22181 17.6568C3.63602 18.2426 3.63602 19.1924 4.22181 19.7782C4.8076 20.3639 5.75734 20.3639 6.34313 19.7782L12 14.1213L17.6568 19.7782Z
+ M17.6568 19.7782C18.2426 20.3639 19.1924 20.3639 19.7782 19.7782C20.3639 19.1924 20.3639 18.2426 19.7782 17.6568L14.1213 12L19.7782 6.34313C20.3639 5.75734 20.3639 4.8076 19.7782 4.22181C19.1924 3.63602 18.2426 3.63602 17.6568 4.22181L12 9.87866L6.34313 4.22181C5.75734 3.63602 4.8076 3.63602 4.22181 4.22181C3.63602 4.8076 3.63602 5.75734 4.22181 6.34313L9.87866 12L4.22181 17.6568C3.63602 18.2426 3.63602 19.1924 4.22181 19.7782C4.8076 20.3639 5.75734 20.3639 6.34313 19.7782L12 14.1213L17.6568 19.7782Z
32
diff --git a/src/Ursa.Themes.Semi/Themes/Shared/ThemeSelector.axaml b/src/Ursa.Themes.Semi/Themes/Shared/ThemeSelector.axaml
index 7ba95b84..d40b263e 100644
--- a/src/Ursa.Themes.Semi/Themes/Shared/ThemeSelector.axaml
+++ b/src/Ursa.Themes.Semi/Themes/Shared/ThemeSelector.axaml
@@ -1,6 +1,7 @@
- M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23ZM17 15C17.476 15 17.9408 14.9525 18.3901 14.862C17.296 17.3011 14.8464 19 12 19C8.13401 19 5 15.866 5 12C5 8.60996 7.40983 5.78277 10.6099 5.13803C10.218 6.01173 10 6.98041 10 8C10 11.866 13.134 15 17 15Z
- M3.55 19.09L4.96 20.5L6.76 18.71L5.34 17.29M12 6C8.69 6 6 8.69 6 12S8.69 18 12 18 18 15.31 18 12C18 8.68 15.31 6 12 6M20 13H23V11H20M17.24 18.71L19.04 20.5L20.45 19.09L18.66 17.29M20.45 5L19.04 3.6L17.24 5.39L18.66 6.81M13 1H11V4H13M6.76 5.39L4.96 3.6L3.55 5L5.34 6.81L6.76 5.39M1 13H4V11H1M13 20H11V23H13
+ M9,2C7.95,2 6.95,2.16 6,2.46C10.06,3.73 13,7.5 13,12C13,16.5 10.06,20.27 6,21.54C6.95,21.84 7.95,22 9,22A10,10 0 0,0 19,12A10,10 0 0,0 9,2Z
+ M12,8A4,4 0 0,0 8,12A4,4 0 0,0 12,16A4,4 0 0,0 16,12A4,4 0 0,0 12,8M12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6A6,6 0 0,1 18,12A6,6 0 0,1 12,18M20,8.69V4H15.31L12,0.69L8.69,4H4V8.69L0.69,12L4,15.31V20H8.69L12,23.31L15.31,20H20V15.31L23.31,12L20,8.69Z
+ M12,18V6A6,6 0 0,1 18,12A6,6 0 0,1 12,18M20,15.31L23.31,12L20,8.69V4H15.31L12,0.69L8.69,4H4V8.69L0.69,12L4,15.31V20H8.69L12,23.31L15.31,20H20V15.31Z
diff --git a/src/Ursa.Themes.Semi/Themes/Shared/TimeBox.axaml b/src/Ursa.Themes.Semi/Themes/Shared/TimeBox.axaml
new file mode 100644
index 00000000..fa6e5d9c
--- /dev/null
+++ b/src/Ursa.Themes.Semi/Themes/Shared/TimeBox.axaml
@@ -0,0 +1,8 @@
+
+
+ 32
+ 24
+ 40
+ 1
+ 3
+
diff --git a/src/Ursa.Themes.Semi/Themes/Shared/_index.axaml b/src/Ursa.Themes.Semi/Themes/Shared/_index.axaml
index 5e434778..a09a2aac 100644
--- a/src/Ursa.Themes.Semi/Themes/Shared/_index.axaml
+++ b/src/Ursa.Themes.Semi/Themes/Shared/_index.axaml
@@ -1,9 +1,10 @@
-
+
+
@@ -13,9 +14,12 @@
+
+
+
-
+
\ No newline at end of file
diff --git a/src/Ursa.Themes.Semi/Ursa.Themes.Semi.csproj b/src/Ursa.Themes.Semi/Ursa.Themes.Semi.csproj
index 03102613..3b663c62 100644
--- a/src/Ursa.Themes.Semi/Ursa.Themes.Semi.csproj
+++ b/src/Ursa.Themes.Semi/Ursa.Themes.Semi.csproj
@@ -1,27 +1,34 @@
-
+
netstandard2.0
enable
enable
latest
- 0.3.0-beta20240226
+ 0.3.0-beta20240708
IRIHI Technology Co., Ltd.
Irihi.Ursa.Themes.Semi
+ irihi.png
+ MIT
+ https://github.com/irihitech/Ursa.Avalonia
-
+
-
+
-
+
+
+
+
+
diff --git a/src/Ursa.Themes.Semi/irihi.png b/src/Ursa.Themes.Semi/irihi.png
new file mode 100644
index 00000000..01c68d91
Binary files /dev/null and b/src/Ursa.Themes.Semi/irihi.png differ
diff --git a/src/Ursa/Controls/Avatar/Avatar.cs b/src/Ursa/Controls/Avatar/Avatar.cs
new file mode 100644
index 00000000..a3d134cb
--- /dev/null
+++ b/src/Ursa/Controls/Avatar/Avatar.cs
@@ -0,0 +1,26 @@
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Media;
+
+namespace Ursa.Controls;
+
+public class Avatar : Button
+{
+ public static readonly StyledProperty SourceProperty = AvaloniaProperty.Register(
+ nameof(Source));
+
+ public static readonly StyledProperty