You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
1005 B
32 lines
1005 B
12 months ago
|
using System.Collections.Generic;
|
||
|
using System.ComponentModel;
|
||
|
using Avalonia.PropertyGrid.ViewModels;
|
||
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||
|
using OneOf;
|
||
|
using StabilityMatrix.Avalonia.ViewModels.Base;
|
||
|
using StabilityMatrix.Avalonia.Views.Dialogs;
|
||
|
using StabilityMatrix.Core.Attributes;
|
||
|
|
||
|
namespace StabilityMatrix.Avalonia.ViewModels.Dialogs;
|
||
|
|
||
|
[View(typeof(PropertyGridDialog))]
|
||
|
[ManagedService]
|
||
|
[Transient]
|
||
|
public partial class PropertyGridViewModel : TaskDialogViewModelBase
|
||
|
{
|
||
|
[ObservableProperty]
|
||
|
[NotifyPropertyChangedFor(nameof(SelectedObjectSource))]
|
||
|
private OneOf<INotifyPropertyChanged, IEnumerable<INotifyPropertyChanged>>? selectedObject;
|
||
|
|
||
|
public object? SelectedObjectSource => SelectedObject?.Value;
|
||
|
|
||
|
[ObservableProperty]
|
||
|
private PropertyGridShowStyle showStyle = PropertyGridShowStyle.Alphabetic;
|
||
|
|
||
|
[ObservableProperty]
|
||
|
private IReadOnlyList<string>? excludeCategories;
|
||
|
|
||
|
[ObservableProperty]
|
||
|
private IReadOnlyList<string>? includeCategories;
|
||
|
}
|