feat: implement locale switch.

This commit is contained in:
rabbitism
2024-01-28 00:12:35 +08:00
parent e18534d9b2
commit f0c8d5dba5
9 changed files with 113 additions and 34 deletions

View File

@@ -1,9 +1,10 @@
<Application
x:Class="Ursa.Demo.App"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:u-semi="https://irihi.tech/ursa/themes/semi">
<Application.Styles>
<StyleInclude Source="avares://Semi.Avalonia/Themes/Index.axaml" />
<StyleInclude Source="avares://Ursa.Themes.Semi/Index.axaml" />
<u-semi:SemiTheme Locale="en-US"/>
</Application.Styles>
</Application>

View File

@@ -115,7 +115,7 @@ public class MessageBoxDemoViewModel: ObservableObject
private async Task OnOkCancelAsync()
{
await Show(MessageBoxButton.OK);
await Show(MessageBoxButton.OKCancel);
}
private async Task Show(MessageBoxButton button)