Example #1
0
        /// <summary>
        /// This method is used to initialize the view model and can be overriden for customization.
        /// </summary>
        protected override void PreInitialize()
        {
            base.PreInitialize();

            foreach (DslEditorModeling::ModelContext modelContext in this.ModelData.AvailableModelContexts)
            {
                if (modelContext.Name == "DefaultContext")
                {
                    DefaultContextModelContextViewModel mDefaultContext = new DefaultContextModelContextViewModel(this.ViewModelStore, modelContext, this);
                    this.AvailableModelModelContextViewModels.Add(mDefaultContext);
                    this.SelectedModelContextViewModel = mDefaultContext;
                }
            }

            this.SearchModel = new TestLanguageSearchViewModel(ViewModelStore as TestLanguageViewModelStore);
            AddViewModel(SearchModel);
            AddViewModel(SearchModel.SearchResultViewModel);

            #region Credits + Further Readings
            this.CreditsViewModel        = new DslEditorViewModelData::CreditsViewModel(this.ViewModelStore);
            this.FurtherReadingViewModel = new DslEditorViewModelData::FurtherReadingViewModel(this.ViewModelStore);


            #endregion
        }
        /// <summary>
        /// This method is used to initialize the view model and can be overriden for customization.
        /// </summary>
        protected override void PreInitialize()
        {         
			base.PreInitialize();

			foreach(DslEditorModeling::ModelContext modelContext in this.ModelData.AvailableModelContexts)
			{
			
				if( modelContext.Name == "DefaultContext")
				{
					DefaultContextModelContextViewModel mDefaultContext = new DefaultContextModelContextViewModel(this.ViewModelStore, modelContext, this);
					this.AvailableModelModelContextViewModels.Add(mDefaultContext);
					this.SelectedModelContextViewModel = mDefaultContext;
				}
			}
			
			this.SearchModel = new TestLanguageSearchViewModel(ViewModelStore as TestLanguageViewModelStore);			
			AddViewModel(SearchModel);
			AddViewModel(SearchModel.SearchResultViewModel);				
	
			#region Credits + Further Readings
			this.CreditsViewModel = new DslEditorViewModelData::CreditsViewModel(this.ViewModelStore);
			this.FurtherReadingViewModel = new DslEditorViewModelData::FurtherReadingViewModel(this.ViewModelStore);

	
			#endregion
		}