diff --git a/demo/Ursa.Demo/Pages/BannerDemo.axaml b/demo/Ursa.Demo/Pages/BannerDemo.axaml index 91c8f894..9b6c591a 100644 --- a/demo/Ursa.Demo/Pages/BannerDemo.axaml +++ b/demo/Ursa.Demo/Pages/BannerDemo.axaml @@ -4,49 +4,65 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - xmlns:pages="clr-namespace:Ursa.Demo.Pages" xmlns:u="https://irihi.tech/ursa" - x:DataType="pages:BannerDemoViewModel" + xmlns:vm="clr-namespace:Ursa.Demo.ViewModels" + x:DataType="vm:BannerDemoViewModel" mc:Ignorable="d"> - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/demo/Ursa.Demo/Pages/BannerDemo.axaml.cs b/demo/Ursa.Demo/Pages/BannerDemo.axaml.cs index cd7b94db..421a235e 100644 --- a/demo/Ursa.Demo/Pages/BannerDemo.axaml.cs +++ b/demo/Ursa.Demo/Pages/BannerDemo.axaml.cs @@ -1,7 +1,4 @@ -using System.Collections.ObjectModel; using Avalonia.Controls; -using Avalonia.Controls.Notifications; -using Avalonia.Markup.Xaml; using Ursa.Demo.ViewModels; namespace Ursa.Demo.Pages; @@ -13,44 +10,4 @@ public BannerDemo() InitializeComponent(); this.DataContext = new BannerDemoViewModel(); } - - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } -} - -public class BannerDemoViewModel : ViewModelBase -{ - private ObservableCollection? _types; - - public ObservableCollection? Types - { - get => _types; - set => SetProperty(ref _types, value); - } - - private NotificationType _selectedType; - - public NotificationType SelectedType - { - get => _selectedType; - set => SetProperty(ref _selectedType, value); - } - - private bool _bordered; - - public bool Bordered - { - get => _bordered; - set => SetProperty(ref _bordered, value); - } - - public BannerDemoViewModel() - { - Types = new ObservableCollection() - { - NotificationType.Information, NotificationType.Success, NotificationType.Warning, NotificationType.Error - }; - } } \ No newline at end of file diff --git a/demo/Ursa.Demo/Pages/MessageBoxDemo.axaml b/demo/Ursa.Demo/Pages/MessageBoxDemo.axaml index 706c8d52..aca40be1 100644 --- a/demo/Ursa.Demo/Pages/MessageBoxDemo.axaml +++ b/demo/Ursa.Demo/Pages/MessageBoxDemo.axaml @@ -13,23 +13,23 @@ - - - + + + + Margin="{DynamicResource BannerCloseButtonMargin}" + HorizontalAlignment="Right" + VerticalAlignment="Top" + Theme="{DynamicResource OverlayCloseButton}" + IsVisible="{TemplateBinding CanClose}" /> @@ -120,4 +120,4 @@ - + \ No newline at end of file diff --git a/src/Ursa.Themes.Semi/Controls/Dialog.axaml b/src/Ursa.Themes.Semi/Controls/Dialog.axaml index 4689866b..1dcf7cba 100644 --- a/src/Ursa.Themes.Semi/Controls/Dialog.axaml +++ b/src/Ursa.Themes.Semi/Controls/Dialog.axaml @@ -76,9 +76,8 @@ + Theme="{StaticResource InnerPathIcon}" + Data="{DynamicResource SemiIconClose}" /> @@ -93,8 +92,7 @@ Header="{DynamicResource STRING_MENU_BRING_FORWARD}"> @@ -104,8 +102,7 @@ Header="{DynamicResource STRING_MENU_BRING_TO_FRONT}"> @@ -115,8 +112,7 @@ Header="{DynamicResource STRING_MENU_SEND_BACKWARD}"> @@ -126,17 +122,15 @@ Header="{DynamicResource STRING_MENU_SEND_TO_BACK}"> + Theme="{StaticResource InnerPathIcon}" + Data="{DynamicResource SemiIconClose}" /> @@ -186,8 +180,8 @@ + Theme="{StaticResource InnerPathIcon}" + Data="{DynamicResource SemiIconClose}" /> @@ -409,8 +402,7 @@ Header="{DynamicResource STRING_MENU_BRING_FORWARD}"> @@ -420,8 +412,7 @@ Header="{DynamicResource STRING_MENU_BRING_TO_FRONT}"> @@ -431,8 +422,7 @@ Header="{DynamicResource STRING_MENU_SEND_BACKWARD}"> @@ -442,8 +432,7 @@ Header="{DynamicResource STRING_MENU_SEND_TO_BACK}"> @@ -453,9 +442,8 @@ Header="{DynamicResource STRING_MENU_DIALOG_CLOSE}"> + Theme="{StaticResource InnerPathIcon}" + Data="{DynamicResource SemiIconClose}" /> @@ -588,8 +576,8 @@ - - + + +