-
Notifications
You must be signed in to change notification settings - Fork 5
/
ViewModelBase.cs
43 lines (36 loc) · 1.02 KB
/
ViewModelBase.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Developed by Softeq Development Corporation
// http://www.softeq.com
using Softeq.XToolkit.Common;
namespace Softeq.XToolkit.WhiteLabel.Mvvm
{
/// <summary>
/// Base implementation of the <see cref="IViewModelBase"/> interface.
/// </summary>
public abstract class ViewModelBase : ObservableObject, IViewModelBase
{
private bool _isBusy;
/// <summary>
/// Gets or sets a value indicating whether this ViewModel is doing some work right now.
/// </summary>
public bool IsBusy
{
get => _isBusy;
set => Set(ref _isBusy, value);
}
/// <inheritdoc/>
public bool IsInitialized { get; private set; }
/// <inheritdoc/>
public virtual void OnInitialize()
{
IsInitialized = true;
}
/// <inheritdoc/>
public virtual void OnAppearing()
{
}
/// <inheritdoc/>
public virtual void OnDisappearing()
{
}
}
}