OliviaAddInPro/ViewModel/PaneLimpiezaViewModel.cs

59 lines
2.4 KiB
C#

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media.Imaging;
namespace OliviaAddInPro
{
class PaneLimpiezaViewModel : PanelViewModelBase
{
private PaneLimpiezaSub1ViewModel _subPanel1ViewModel;
private PaneLimpiezaSub2ViewModel _subPanel2ViewModel;
//private SubPanel3ViewModel _subPanel3ViewModel;
public PaneLimpiezaViewModel()
{
_subPanel1ViewModel = new PaneLimpiezaSub1ViewModel();
_subPanel2ViewModel = new PaneLimpiezaSub2ViewModel();
//_subPanel3ViewModel = new SubPanel3ViewModel();
OptionsMenu = new ObservableCollection<OptionsMenuItem>
{
new OptionsMenuItem(new BitmapImage(new Uri("pack://application:,,,/OliviaAddInPro;component/Resources/Dog32.png")), Resource1.String_tto, _subPanel1ViewModel),
new OptionsMenuItem(new BitmapImage(new Uri("pack://application:,,,/OliviaAddInPro;component/Resources/Dino32.png")), Resource1.String_zonif, _subPanel2ViewModel),
//new OptionsMenuItem(new BitmapImage(new Uri("pack://application:,,,/CustomCatalog;component/Resources/panda-32.png")), "Option 3", _subPanel3ViewModel)
};
SelectedOption = OptionsMenu[0];
}
public override string DisplayName
{
get { return Resource1.String_header_limpieza; }
}
private ObservableCollection<OptionsMenuItem> _optionsMenu = new ObservableCollection<OptionsMenuItem>();
public ObservableCollection<OptionsMenuItem> OptionsMenu
{
get { return _optionsMenu; }
set { SetProperty(ref _optionsMenu, value, () => OptionsMenu); }
}
private PanelViewModelBase _currentSubPanelPage;
public PanelViewModelBase CurrentSubPanelPage
{
get { return _currentSubPanelPage; }
set { SetProperty(ref _currentSubPanelPage, value, () => CurrentSubPanelPage); }
}
private OptionsMenuItem _selectionOption;
public OptionsMenuItem SelectedOption
{
get { return _selectionOption; }
set {
SetProperty(ref _selectionOption, value, () => SelectedOption);
CurrentSubPanelPage = value.SubPanelViewModel;
}
}
}
}