Merge pull request #49 from irihitech/order

Order of Colors
This commit is contained in:
Dong Bin
2023-12-26 15:45:45 +08:00
committed by GitHub
7 changed files with 41 additions and 37 deletions

View File

@@ -14,16 +14,17 @@ public partial class BannerDemo : UserControl
InitializeComponent();
this.DataContext = new BannerDemoViewModel();
}
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
}
public class BannerDemoViewModel: ViewModelBase
public class BannerDemoViewModel : ViewModelBase
{
private ObservableCollection<NotificationType> _types;
public ObservableCollection<NotificationType> Types
{
get => _types;
@@ -48,6 +49,9 @@ public class BannerDemoViewModel: ViewModelBase
public BannerDemoViewModel()
{
Types = new ObservableCollection<NotificationType>() { NotificationType.Information, NotificationType.Warning, NotificationType.Error, NotificationType.Success };
Types = new ObservableCollection<NotificationType>()
{
NotificationType.Information, NotificationType.Success, NotificationType.Warning, NotificationType.Error
};
}
}