public MainViewModel() { blueVM = new BlueViewModel(); orangeVM = new OrangeViewModel(); redVM = new RedViewModel(); SelectBlueViewCommand = new RelayCommand(() => SelectedView = blueVM); SelectOrangeViewCommand = new RelayCommand(() => SelectedView = orangeVM); SelectRedViewCommand = new RelayCommand(() => SelectedView = redVM); }
private void SwitchClick(object sender, RoutedEventArgs e) { if (CurrentViewModel is RedViewModel) { CurrentViewModel = new BlueViewModel(); } else { CurrentViewModel = new RedViewModel(); } }
protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); SimpleCore core = new SimpleCore(); var appVm = new AppViewModel(); var redVm = new RedViewModel(); core.Startup(appVm, redVm, true); DataTemplateManager manager = new DataTemplateManager(); manager.LoadDataTemplatesByConvention(); }
private void RedView_Clicked(object sender, RoutedEventArgs e) { DataContext = new RedViewModel(); lbl_status.Content = "Add Clicked"; }
private void RedView_Clicked(object sender, RoutedEventArgs e) { DataContext = new RedViewModel(); }
public ShellViewModel() { Red = new RedViewModel(); Green = new GreenViewModel(); Blue = new BlueViewModel(); }
private void Button_Click(object sender, RoutedEventArgs e) { //red DataContext = new RedViewModel(); }
public RedView(RedViewModel viewModel) { InitializeComponent(); this.DataContext = viewModel; }
public PaginaRed() { InitializeComponent(); BindingContext = new RedViewModel(); }
public RedViewController() { InitializeComponent(); mViewModel = new RedViewModel(); this.DataContext = mViewModel; }