Click here to Skip to main content
11,583,865 members (62,980 online)
Click here to Skip to main content
Add your own
alternative version

Open Child Window in MVVM environment

, 14 May 2012 CPOL 27.5K 1.2K 12
How to open pop up window in MVVM environment. You can use it in WPF or Silverlight.
WindowWithMVVM.zip
WindowWithMVVM
WindowWithMVVM.suo
WindowWithMVVM.Web
App_Data
bin
WindowWithMVVM.Web.dll
WindowWithMVVM.Web.pdb
ClientBin
WindowWithMVVM.xap
Models
Shared
obj
Debug
DesignTimeResolveAssemblyReferencesInput.cache
GenerateResource.read.1.tlog
GenerateResource.write.1.tlog
ResolveAssemblyReference.cache
TempPE
WindowWithMVVM.Web.dll
WindowWithMVVM.Web.pdb
WindowWithMVVM.Web.Resources.RegistrationDataResources.resources
WindowWithMVVM.Web.Resources.ValidationErrorResources.resources
Properties
Resources
Services
WindowWithMVVM.Web.csproj.user
WindowWithMVVM
Assets
Resources
Bin
Debug
ar
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.resources.dll
bg
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.resources.dll
ca
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.resources.dll
cs
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.resources.dll
da
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.resources.dll
de
System.ComponentModel.DataAnnotations.resources.dll
System.ServiceModel.DomainServices.Client.resources.dll
System.ServiceModel.DomainServices.Client.Web.resources.dll
System.ServiceModel.Web.Extensions.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Navigation.resources.dll
System.Windows.Controls.resources.dll
el
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.resources.dll
es
System.ComponentModel.DataAnnotations.resources.dll
System.ServiceModel.DomainServices.Client.resources.dll
System.ServiceModel.DomainServices.Client.Web.resources.dll
System.ServiceModel.Web.Extensions.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Navigation.resources.dll
System.Windows.Controls.resources.dll
et
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.resources.dll
eu
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.resources.dll
fi
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.resources.dll
fr
System.ComponentModel.DataAnnotations.resources.dll
System.ServiceModel.DomainServices.Client.resources.dll
System.ServiceModel.DomainServices.Client.Web.resources.dll
System.ServiceModel.Web.Extensions.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Navigation.resources.dll
System.Windows.Controls.resources.dll
he
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.resources.dll
hr
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.resources.dll
hu
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.resources.dll
id
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.resources.dll
it
System.ComponentModel.DataAnnotations.resources.dll
System.ServiceModel.DomainServices.Client.resources.dll
System.ServiceModel.DomainServices.Client.Web.resources.dll
System.ServiceModel.Web.Extensions.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Navigation.resources.dll
System.Windows.Controls.resources.dll
ja
System.ComponentModel.DataAnnotations.resources.dll
System.ServiceModel.DomainServices.Client.resources.dll
System.ServiceModel.DomainServices.Client.Web.resources.dll
System.ServiceModel.Web.Extensions.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Navigation.resources.dll
System.Windows.Controls.resources.dll
ko
System.ComponentModel.DataAnnotations.resources.dll
System.ServiceModel.DomainServices.Client.resources.dll
System.ServiceModel.DomainServices.Client.Web.resources.dll
System.ServiceModel.Web.Extensions.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Navigation.resources.dll
System.Windows.Controls.resources.dll
lt
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.resources.dll
lv
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.resources.dll
ms
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.resources.dll
nl
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.resources.dll
no
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.resources.dll
pl
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.resources.dll
pt
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.resources.dll
pt-BR
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.resources.dll
ro
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.resources.dll
ru
System.ComponentModel.DataAnnotations.resources.dll
System.ServiceModel.DomainServices.Client.resources.dll
System.ServiceModel.DomainServices.Client.Web.resources.dll
System.ServiceModel.Web.Extensions.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Navigation.resources.dll
System.Windows.Controls.resources.dll
sk
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.resources.dll
sl
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.resources.dll
sr-Cyrl-CS
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.resources.dll
sr-Latn-CS
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.resources.dll
sv
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.resources.dll
System.ComponentModel.DataAnnotations.dll
System.ServiceModel.DomainServices.Client.dll
System.ServiceModel.DomainServices.Client.Web.dll
System.ServiceModel.Web.Extensions.dll
System.Windows.Controls.Data.DataForm.Toolkit.dll
System.Windows.Controls.Data.Input.dll
System.Windows.Controls.dll
System.Windows.Controls.Navigation.dll
th
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.resources.dll
tr
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.resources.dll
uk
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.resources.dll
vi
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.resources.dll
WindowWithMVVM.dll
WindowWithMVVM.pdb
WindowWithMVVM.xap
zh-Hans
System.ComponentModel.DataAnnotations.resources.dll
System.ServiceModel.DomainServices.Client.resources.dll
System.ServiceModel.DomainServices.Client.Web.resources.dll
System.ServiceModel.Web.Extensions.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Navigation.resources.dll
System.Windows.Controls.resources.dll
zh-Hant
System.ComponentModel.DataAnnotations.resources.dll
System.ServiceModel.DomainServices.Client.resources.dll
System.ServiceModel.DomainServices.Client.Web.resources.dll
System.ServiceModel.Web.Extensions.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Navigation.resources.dll
System.Windows.Controls.resources.dll
Controls
Generated_Code
Models
Shared
Helpers
Libs
System.Windows.Controls.Data.DataForm.Toolkit.dll
Models
obj
Debug
Assets
Controls
DesignTimeResolveAssemblyReferences.cache
DesignTimeResolveAssemblyReferencesInput.cache
GenerateResource.read.1.tlog
GenerateResource.write.1.tlog
ResolveAssemblyReference.cache
TempPE
Assets.Resources.ApplicationStrings.Designer.cs.dll
Assets.Resources.ErrorResources.Designer.cs.dll
Assets.Resources.SecurityQuestions.Designer.cs.dll
Web.Resources.RegistrationDataResources.Designer.cs.dll
Web.Resources.ValidationErrorResources.Designer.cs.dll
Views
Login
WindowWithMVVM.Assets.Resources.ApplicationStrings.resources
WindowWithMVVM.Assets.Resources.ErrorResources.resources
WindowWithMVVM.Assets.Resources.SecurityQuestions.resources
WindowWithMVVM.dll
WindowWithMVVM.g.resources
WindowWithMVVM.pdb
WindowWithMVVM.Web.Resources.RegistrationDataResources.resources
WindowWithMVVM.Web.Resources.ValidationErrorResources.resources
Properties
ViewModel
Views
Login
Web
Resources
WindowWithMVVM.csproj.user
#pragma checksum "C:\ManojWork\Article\Open Child Window in MVVM environment\WindowWithMVVM\WindowWithMVVM\MainPage.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "1531E85AADA4E52E28E1AFE1FDF5242C"
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.239
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

using System;
using System.Windows;
using System.Windows.Automation;
using System.Windows.Automation.Peers;
using System.Windows.Automation.Provider;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Interop;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Resources;
using System.Windows.Shapes;
using System.Windows.Threading;


namespace WindowWithMVVM {
    
    
    public partial class MainPage : System.Windows.Controls.UserControl {
        
        internal System.Windows.Controls.Grid LayoutRoot;
        
        internal System.Windows.Controls.Border ContentBorder;
        
        internal System.Windows.Controls.Frame ContentFrame;
        
        internal System.Windows.Controls.Grid NavigationGrid;
        
        internal System.Windows.Controls.Border BrandingBorder;
        
        internal System.Windows.Controls.StackPanel BrandingStackPanel;
        
        internal System.Windows.Controls.TextBlock ApplicationNameTextBlock;
        
        internal System.Windows.Controls.Border LinksBorder;
        
        internal System.Windows.Controls.StackPanel LinksStackPanel;
        
        internal System.Windows.Controls.HyperlinkButton Link1;
        
        internal System.Windows.Shapes.Rectangle Divider1;
        
        internal System.Windows.Controls.HyperlinkButton Link2;
        
        private bool _contentLoaded;
        
        /// <summary>
        /// InitializeComponent
        /// </summary>
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public void InitializeComponent() {
            if (_contentLoaded) {
                return;
            }
            _contentLoaded = true;
            System.Windows.Application.LoadComponent(this, new System.Uri("/WindowWithMVVM;component/MainPage.xaml", System.UriKind.Relative));
            this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
            this.ContentBorder = ((System.Windows.Controls.Border)(this.FindName("ContentBorder")));
            this.ContentFrame = ((System.Windows.Controls.Frame)(this.FindName("ContentFrame")));
            this.NavigationGrid = ((System.Windows.Controls.Grid)(this.FindName("NavigationGrid")));
            this.BrandingBorder = ((System.Windows.Controls.Border)(this.FindName("BrandingBorder")));
            this.BrandingStackPanel = ((System.Windows.Controls.StackPanel)(this.FindName("BrandingStackPanel")));
            this.ApplicationNameTextBlock = ((System.Windows.Controls.TextBlock)(this.FindName("ApplicationNameTextBlock")));
            this.LinksBorder = ((System.Windows.Controls.Border)(this.FindName("LinksBorder")));
            this.LinksStackPanel = ((System.Windows.Controls.StackPanel)(this.FindName("LinksStackPanel")));
            this.Link1 = ((System.Windows.Controls.HyperlinkButton)(this.FindName("Link1")));
            this.Divider1 = ((System.Windows.Shapes.Rectangle)(this.FindName("Divider1")));
            this.Link2 = ((System.Windows.Controls.HyperlinkButton)(this.FindName("Link2")));
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

ManojKumar19
Architect
United States United States
Manoj Kumar

Architect, Lead Software Engineer and Senior BI Developer | Microsoft Certified Technology Specialist(MCTS) | Exp in C#, ASP.Net, MVC, Razor View Engine and EF Code First, HTML5, CSS3, JQuery, Javascript, AngularJS, JSON, AJAX, KnockoutJS, Silverlight, WPF, WCF, WF, SSRS, SSAS, SSIS, ETL, SQL Server, Usability/User Experience etc.

He lives with his wife Supriya and daughter Tisya in Bay Area.

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.150603.1 | Last Updated 14 May 2012
Article Copyright 2012 by ManojKumar19
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid