Click here to Skip to main content
11,584,288 members (65,033 online)
Click here to Skip to main content
Add your own
alternative version

An Address Book Application Made in MVVM For Metro Style App in Windows 8 Part 2

, 29 May 2012 CPOL 20.1K 1.2K 14
This is the Second Part XML file as data source in Windows8
Mvvm3_Full.zip
Mvvm3_Basic
Mvvm3_Basic
Assets
Logo.png
SmallLogo.png
SplashScreen.png
StoreLogo.png
bin
ARM
Debug
Release
Debug
AppX
Assets
Logo.png
SmallLogo.png
SplashScreen.png
StoreLogo.png
Common
microsoft.system.package.metadata
S-1-5-21-3520127098-591485480-2378297468-1001.pckgdep
Mvvm3_Basic.exe
Mvvm3_Basic.pdb
resources.pri
vs.appxrecipe
Assets
Logo.png
SmallLogo.png
SplashScreen.png
StoreLogo.png
Common
Mvvm3_Basic.build.appxrecipe
Mvvm3_Basic.exe
Mvvm3_Basic.pdb
resources.pri
Release
x64
Debug
Release
x86
Debug
Release
Common
Model
Mvvm3_Basic_TemporaryKey.pfx
obj
Debug
Common
DesignTimeResolveAssemblyReferencesInput.cache
intermediatexaml
Mvvm3_Basic.exe
Mvvm3_Basic.pdb
LanguageQualifiers.txt.intermediate
layout.resfiles
layout.resfiles.intermediate
Mvvm3_Basic.exe
Mvvm3_Basic.pdb
pri.resfiles
pri.resfiles.intermediate
priconfig.xml.intermediate
resources.resfiles
resources.resfiles.intermediate
TempPE
Package.appxmanifest
Properties
ViewModel
Mvvm3_Basic.v11.suo
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;

// The Blank Application template is documented at http://go.microsoft.com/fwlink/?LinkId=234227

namespace Mvvm3_Basic
{
    /// <summary>
    /// Provides application-specific behavior to supplement the default Application class.
    /// </summary>
    sealed partial class App : Application
    {
        /// <summary>
        /// Initializes the singleton application object.  This is the first line of authored code
        /// executed, and as such is the logical equivalent of main() or WinMain().
        /// </summary>
       public App()
        {
            this.InitializeComponent();
            this.Suspending += OnSuspending;
        }

        /// <summary>
        /// Invoked when the application is launched normally by the end user.  Other entry points
        /// will be used when the application is launched to open a specific file, to display
        /// search results, and so forth.
        /// </summary>
        /// <param name="args">Details about the launch request and process.</param>
        protected override void OnLaunched(LaunchActivatedEventArgs args)
        {
            if (args.PreviousExecutionState == ApplicationExecutionState.Terminated)
            {
                //TODO: Load state from previously suspended application
            }

            // Create a Frame to act navigation context and navigate to the first page
            var rootFrame = new Frame();
            rootFrame.Navigate(typeof(BlankPage));

            // Place the frame in the current Window and ensure that it is active
            Window.Current.Content = rootFrame;
            Window.Current.Activate();
        }

        /// <summary>
        /// Invoked when application execution is being suspended.  Application state is saved
        /// without knowing whether the application will be terminated or resumed with the contents
        /// of memory still intact.
        /// </summary>
        /// <param name="sender">The source of the suspend request.</param>
        /// <param name="e">Details about the suspend request.</param>
        void OnSuspending(object sender, SuspendingEventArgs e)
        {
            //TODO: Save application state and stop any background activity
        }
    }
}

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

santosh_pathak
CEO Addya Technologies
India India
"I am the CEO"
An Entrepreneur, Driving an Business Transformation Unit.

You may also be interested in...

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