feat: redesign Banner.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.Notifications;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using Ursa.Demo.ViewModels;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
@@ -20,37 +20,9 @@ public partial class BannerDemo : UserControl
|
||||
}
|
||||
}
|
||||
|
||||
public class BannerDemoViewModel : ViewModelBase
|
||||
public partial class BannerDemoViewModel : ViewModelBase
|
||||
{
|
||||
private ObservableCollection<NotificationType>? _types;
|
||||
|
||||
public ObservableCollection<NotificationType>? 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>()
|
||||
{
|
||||
NotificationType.Information, NotificationType.Success, NotificationType.Warning, NotificationType.Error
|
||||
};
|
||||
}
|
||||
[ObservableProperty] private NotificationType _selectedType;
|
||||
[ObservableProperty] private bool _bordered;
|
||||
[ObservableProperty] private bool _canClose;
|
||||
}
|
||||
Reference in New Issue
Block a user