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.
37 lines
1.2 KiB
37 lines
1.2 KiB
using System.Windows; |
|
using System.Windows.Controls; |
|
using System.Windows.Input; |
|
using HandyControl.Controls; |
|
|
|
namespace SparkClient.ViewModel.BaseWindow; |
|
|
|
public class BaseControlVM : BaseViewModel |
|
{ |
|
string _windowTitle; |
|
|
|
private Visibility _showFunctionButton; |
|
private string _functionButtonIcon; |
|
|
|
private Object _viewContent; |
|
|
|
public string WindowTitle { get { return _windowTitle; } set { _windowTitle = value; OnPropertyChanged("WindowTitle"); } } |
|
public Visibility ShowFunctionButton { get { return _showFunctionButton; } set { _showFunctionButton = value; OnPropertyChanged("ShowFunctionButton"); } } |
|
public string FunctionButtonIcon { get { return _functionButtonIcon; } set { _functionButtonIcon = value; OnPropertyChanged("FunctionButtonIcon"); } } |
|
public Object ViewControl { get { return _viewContent; } set { _viewContent = value; OnPropertyChanged("ViewControl"); } } |
|
|
|
public object Content { get; } |
|
public ICommand CloseCommand { get; } |
|
|
|
public BaseControlVM(BaseViewModel vm) |
|
{ |
|
Content = vm; |
|
|
|
CloseCommand = new RelayCommand(CloseVM); |
|
} |
|
|
|
public void CloseVM(object parameter) |
|
{ |
|
WindowManager.mainViewModel.Content = WindowManager.PreviousVM(); |
|
} |
|
|
|
} |