//ObservableCollection<ViewModelBase> _viewModels; //ObservableCollection<ViewModelBase> _cViewModels; //ObservableCollection<ViewModelBase> _fViewModels; public MainWindowViewModel() { //add available pages //UserControl indexView = new IndexView(); //UserControl raceView = new RaceListView(); //UserControl abilityView = new AbilityView(); UserControl creationView = new CharacterCreationView(); UserControl newView = new CharacterSheetView(); //UserControl raceView = new RaceViewGrid(); UserControl raceCreationView = new AddRaceView(); UserControl testView = new TestView(); //UserControl characterView = new CharacterView(); PageViewModels.Add(new CharacterViewModel()); PageViewModels.Add(cc); PageViewModels.Add(new RaceCreationViewModel()); PageViewModels.Add(new TestViewModel()); //PageViewModels.Add(new RaceListViewModel(new RaceRepository())); //PageViewModels.Add(new AbilityViewModel()); //PageViewModels.Add(new IndexViewModel()); PageViews.Add(newView); PageViews.Add(creationView); PageViews.Add(raceCreationView); PageViews.Add(testView); //PageViews.Add(raceView); //PageViews.Add(abilityView); //PageViews.Add(indexView); //PageViewModels.Add(new CharacterViewModel()); CurrentPageView = PageViews[1]; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.Control = ((dndReboot.View.TestView)(target)); return; case 2: this.TestBlock = ((System.Windows.Controls.TextBlock)(target)); return; } this._contentLoaded = true; }