Fixed Error databinding

- I don't understand why this works now, but it does and I'm glad.
This commit is contained in:
adroslice 2019-11-17 04:47:17 +01:00
parent e0fe30b380
commit 2aa1fa6529

View File

@ -11,7 +11,7 @@ namespace BFR.Operations
public abstract class Operation : AvaloniaObject public abstract class Operation : AvaloniaObject
{ {
// Needs to be avalonia property to update UI with any potential error. // Needs to be avalonia property to update UI with any potential error.
public AvaloniaProperty<string> errorProperty = AvaloniaProperty.Register<Operation, string>(nameof(Error), defaultValue: ""); private readonly AvaloniaProperty<string> errorProperty = AvaloniaProperty.Register<MainWindow, string>(nameof(Error), defaultValue: "");
public string Error { get => GetValue(errorProperty); set => SetValue(errorProperty, value); } public string Error { get => GetValue(errorProperty); set => SetValue(errorProperty, value); }
public bool IsEnabled { get; set; } = true; public bool IsEnabled { get; set; } = true;
public abstract string Name { get; } public abstract string Name { get; }