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.
25 lines
595 B
25 lines
595 B
1 year ago
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||
|
|
||
|
namespace StabilityMatrix.Avalonia.ViewModels;
|
||
|
|
||
|
/// <summary>
|
||
|
/// Generic view model for progress reporting.
|
||
|
/// </summary>
|
||
|
public partial class ProgressViewModel : ObservableObject
|
||
|
{
|
||
|
[ObservableProperty]
|
||
|
[NotifyPropertyChangedFor(nameof(IsTextVisible))]
|
||
|
private string text;
|
||
|
|
||
|
[ObservableProperty]
|
||
|
private double value;
|
||
|
|
||
|
[ObservableProperty]
|
||
|
private bool isIndeterminate;
|
||
|
|
||
|
[ObservableProperty]
|
||
|
private bool isProgressVisible;
|
||
|
|
||
|
public virtual bool IsTextVisible => string.IsNullOrWhiteSpace(Text);
|
||
|
}
|