diff --git a/demo/Ursa.Demo.Desktop/Ursa.Demo.Desktop.csproj b/demo/Ursa.Demo.Desktop/Ursa.Demo.Desktop.csproj
index 6566753..ca92927 100644
--- a/demo/Ursa.Demo.Desktop/Ursa.Demo.Desktop.csproj
+++ b/demo/Ursa.Demo.Desktop/Ursa.Demo.Desktop.csproj
@@ -6,12 +6,16 @@
net8.0
enable
true
- false
+ true
app.manifest
+
+
+
+
diff --git a/demo/Ursa.Demo/Roots.xml b/demo/Ursa.Demo/Roots.xml
index 43bb5f4..393d98f 100644
--- a/demo/Ursa.Demo/Roots.xml
+++ b/demo/Ursa.Demo/Roots.xml
@@ -1,5 +1,4 @@
-
diff --git a/demo/Ursa.Demo/Ursa.Demo.csproj b/demo/Ursa.Demo/Ursa.Demo.csproj
index e95fe55..b537deb 100644
--- a/demo/Ursa.Demo/Ursa.Demo.csproj
+++ b/demo/Ursa.Demo/Ursa.Demo.csproj
@@ -12,6 +12,7 @@
+
@@ -19,7 +20,7 @@
-
+
diff --git a/demo/Ursa.PrismDialogDemo/Ursa.PrismDialogDemo.csproj b/demo/Ursa.PrismDialogDemo/Ursa.PrismDialogDemo.csproj
index d5c5446..5c4eaec 100644
--- a/demo/Ursa.PrismDialogDemo/Ursa.PrismDialogDemo.csproj
+++ b/demo/Ursa.PrismDialogDemo/Ursa.PrismDialogDemo.csproj
@@ -16,7 +16,7 @@
-
+
diff --git a/src/Ursa.PrismExtension/Ursa.PrismExtension.csproj b/src/Ursa.PrismExtension/Ursa.PrismExtension.csproj
index 52fc627..071d1bc 100644
--- a/src/Ursa.PrismExtension/Ursa.PrismExtension.csproj
+++ b/src/Ursa.PrismExtension/Ursa.PrismExtension.csproj
@@ -1,7 +1,7 @@
- netstandard2.0
+ net8.0
0.3.0-beta20240226
enable
IRIHI Technology Co., Ltd.
diff --git a/src/Ursa.Themes.Semi/Controls/DateRangePicker.axaml b/src/Ursa.Themes.Semi/Controls/DateRangePicker.axaml
index 72cc4c9..1ec994c 100644
--- a/src/Ursa.Themes.Semi/Controls/DateRangePicker.axaml
+++ b/src/Ursa.Themes.Semi/Controls/DateRangePicker.axaml
@@ -59,7 +59,7 @@
Name="ClearButton"
Grid.Column="3"
Padding="8,0"
- Command="{Binding $parent[contracts:IClearControl].Clear}"
+ Command="{Binding $parent[u:DateRangePicker].Clear}"
Content="{DynamicResource IconButtonClearData}"
Focusable="False"
IsVisible="False"
diff --git a/src/Ursa.Themes.Semi/Controls/NumericUpDown.axaml b/src/Ursa.Themes.Semi/Controls/NumericUpDown.axaml
index 1efd0a2..31824c8 100644
--- a/src/Ursa.Themes.Semi/Controls/NumericUpDown.axaml
+++ b/src/Ursa.Themes.Semi/Controls/NumericUpDown.axaml
@@ -25,8 +25,8 @@
-
-
+
+
@@ -44,7 +44,7 @@
diff --git a/src/Ursa.Themes.Semi/Index.axaml b/src/Ursa.Themes.Semi/Index.axaml
index 92b8e18..f22145c 100644
--- a/src/Ursa.Themes.Semi/Index.axaml
+++ b/src/Ursa.Themes.Semi/Index.axaml
@@ -2,8 +2,8 @@
-
-
+
+
diff --git a/src/Ursa.Themes.Semi/Index.axaml.cs b/src/Ursa.Themes.Semi/Index.axaml.cs
index eec6fa7..9151917 100644
--- a/src/Ursa.Themes.Semi/Index.axaml.cs
+++ b/src/Ursa.Themes.Semi/Index.axaml.cs
@@ -2,6 +2,7 @@
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
using Avalonia.Styling;
+using Ursa.Themes.Semi.Locale;
namespace Ursa.Themes.Semi;
@@ -10,14 +11,14 @@ namespace Ursa.Themes.Semi;
///
public class SemiTheme: Styles
{
- private static readonly Lazy> _localeToResource = new Lazy>(
- () => new Dictionary
+ 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" },
+ { new CultureInfo("zh-CN"), new zh_cn() },
+ { new CultureInfo("en-US"), new en_us() },
});
- private static readonly string _defaultResource = "avares://Ursa.Themes.Semi/Locale/zh-CN.axaml";
+ private static readonly ResourceDictionary _defaultResource = new zh_cn();
private readonly IServiceProvider? sp;
public SemiTheme(IServiceProvider? provider = null)
@@ -36,9 +37,8 @@ public class SemiTheme: Styles
{
_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)
+ if (resource is null) return;
+ foreach (var kv in resource)
{
this.Resources.Add(kv);
}
@@ -51,7 +51,7 @@ public class SemiTheme: Styles
}
}
- private static string TryGetLocaleResource(CultureInfo? locale)
+ private static ResourceDictionary? TryGetLocaleResource(CultureInfo? locale)
{
if (Equals(locale, CultureInfo.InvariantCulture))
{
diff --git a/src/Ursa.Themes.Semi/Locale/en-us.axaml b/src/Ursa.Themes.Semi/Locale/en-us.axaml
index 5f2389b..feb80a4 100644
--- a/src/Ursa.Themes.Semi/Locale/en-us.axaml
+++ b/src/Ursa.Themes.Semi/Locale/en-us.axaml
@@ -1,4 +1,5 @@
Bring to Front
diff --git a/src/Ursa.Themes.Semi/Locale/en-us.axaml.cs b/src/Ursa.Themes.Semi/Locale/en-us.axaml.cs
new file mode 100644
index 0000000..896620e
--- /dev/null
+++ b/src/Ursa.Themes.Semi/Locale/en-us.axaml.cs
@@ -0,0 +1,8 @@
+using Avalonia.Controls;
+
+namespace Ursa.Themes.Semi.Locale;
+
+public class en_us: ResourceDictionary
+{
+
+}
\ No newline at end of file
diff --git a/src/Ursa.Themes.Semi/Locale/zh-cn.axaml b/src/Ursa.Themes.Semi/Locale/zh-cn.axaml
index 94d2f9e..bd068cd 100644
--- a/src/Ursa.Themes.Semi/Locale/zh-cn.axaml
+++ b/src/Ursa.Themes.Semi/Locale/zh-cn.axaml
@@ -1,4 +1,5 @@
置于顶层
diff --git a/src/Ursa.Themes.Semi/Locale/zh-cn.axaml.cs b/src/Ursa.Themes.Semi/Locale/zh-cn.axaml.cs
new file mode 100644
index 0000000..7d5b9fc
--- /dev/null
+++ b/src/Ursa.Themes.Semi/Locale/zh-cn.axaml.cs
@@ -0,0 +1,8 @@
+using Avalonia.Controls;
+
+namespace Ursa.Themes.Semi.Locale;
+
+public class zh_cn: ResourceDictionary
+{
+
+}
\ No newline at end of file
diff --git a/src/Ursa/Controls/EnumSelector/EnumSelector.cs b/src/Ursa/Controls/EnumSelector/EnumSelector.cs
index 6c48970..2fb8733 100644
--- a/src/Ursa/Controls/EnumSelector/EnumSelector.cs
+++ b/src/Ursa/Controls/EnumSelector/EnumSelector.cs
@@ -64,7 +64,7 @@ public class EnumSelector: TemplatedControl
nameof(Values), o => o.Values);
private IList? _values;
- internal IList? Values
+ public IList? Values
{
get => _values;
private set => SetAndRaise(ValuesProperty, ref _values, value);
diff --git a/src/Ursa/Controls/NumberDisplayer/NumberDisplayerBase.cs b/src/Ursa/Controls/NumberDisplayer/NumberDisplayerBase.cs
index 25e817d..b8b174b 100644
--- a/src/Ursa/Controls/NumberDisplayer/NumberDisplayerBase.cs
+++ b/src/Ursa/Controls/NumberDisplayer/NumberDisplayerBase.cs
@@ -12,7 +12,7 @@ public abstract class NumberDisplayerBase : TemplatedControl
nameof(InternalText), o => o.InternalText, (o, v) => o.InternalText = v);
private string _internalText;
- internal string InternalText
+ public string InternalText
{
get => _internalText;
set => SetAndRaise(InternalTextProperty, ref _internalText, value);
diff --git a/src/Ursa/Controls/VerificationCode/VerificationCode.cs b/src/Ursa/Controls/VerificationCode/VerificationCode.cs
index 0a82576..3fcfa46 100644
--- a/src/Ursa/Controls/VerificationCode/VerificationCode.cs
+++ b/src/Ursa/Controls/VerificationCode/VerificationCode.cs
@@ -59,13 +59,13 @@ public class VerificationCode: TemplatedControl
}
public static readonly DirectProperty> DigitsProperty = AvaloniaProperty.RegisterDirect>(
- nameof(Digits), o => o.Digits, (o, v) => o.Digits = v);
+ nameof(Digits), o => o.Digits);
private IList _digits = [];
- internal IList Digits
+ public IList Digits
{
get => _digits;
- set => SetAndRaise(DigitsProperty, ref _digits, value);
+ private set => SetAndRaise(DigitsProperty, ref _digits, value);
}
public static readonly RoutedEvent CompleteEvent =