ready for display Modal
This commit is contained in:
31
Apollon.WPF/Stores/ModalNavigationStore.cs
Normal file
31
Apollon.WPF/Stores/ModalNavigationStore.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using Apollon.WPF.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Apollon.WPF.Stores
|
||||
{
|
||||
public class ModalNavigationStore
|
||||
{
|
||||
private ViewModelBase _currentViewModel
|
||||
;
|
||||
public ViewModelBase CurrentViewModel
|
||||
{
|
||||
get
|
||||
{
|
||||
return _currentViewModel;
|
||||
}
|
||||
set
|
||||
{
|
||||
_currentViewModel = value;
|
||||
CurrentViewModelChanged?.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsOpen => CurrentViewModel != null;
|
||||
|
||||
public event Action CurrentViewModelChanged;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user