Delen via


Developing a Windows Store business app using C#, XAML, and Prism table of contents

[This article is for Windows 8.x and Windows Phone 8.x developers writing Windows Runtime apps. If you’re developing for Windows 10, see the latest documentation]

From: Developing a Windows Store business app using C#, XAML, and Prism for the Windows Runtime

Previous page

Discover the table of contents for Developing a Windows Store business app using C#, XAML, and Prism for the Windows Runtime. You can use this table of contents to navigate through the documentation.

Download

After you download the code, see Getting started using Prism for the Windows Runtime for instructions on how to compile and run the reference implementation, as well as understand the Microsoft Visual Studio solution structure.

Table of contents

Developing a Windows Store business app using C#, XAML, and Prism for the Windows Runtime

Prerequisites

Exploring the guidance

What's in the box?

Where to start?

Exploring the documentation

Community

Release notes

Learning resources

Download Prism for Windows 8.0

Getting started using Prism for the Windows Runtime

Building and running the sample

Visual Studio solution structure for a Windows Store business app that uses the MVVM pattern

The AdventureWorks.Shopper project

The AdventureWorks.UILogic project

The AdventureWorks.WebServices project

The Microsoft.Practices.Prism.PubSubEvents project

The Microsoft.Practices.Prism.StoreApps project

Where to get more info

Developer guidance summary and checklists for Windows Store business apps using C#, XAML, and Prism

Making key decisions

Windows Store business apps developer checklists

Designing the user experience

Using the Model-View-ViewModel (MVVM) pattern

Creating and navigating between pages

Using touch

Validating user input

Managing application data

Handling suspend, resume, and activation

Communicating between loosely coupled components

Working with tiles

Implementing search

Improving performance

Testing and deploying apps

Developer tasks for building a Windows Store business app using C#, XAML, and Prism

Windows Store business app developer tasks

Guidance summary and checklists for Windows Store business apps

Using Prism for the Windows Runtime

Designing the user experience

Creating pages

Using touch

Managing application data

Working with tiles

Implementing search

Improving performance

Testing and deploying apps

Extended splash screen Quickstart

Incremental loading Quickstart

Using Prism to Create a Windows Store app

Architecture of a Windows Store business app that uses Prism

Creating a Windows Store app project using Prism and Unity

Creating a view

Creating a view model class

Creating a model class with validation support

Adding items to the Settings pane

Changing the Prism conventions

Changing the convention for naming and locating views

Changing the convention for naming, locating, and associating view models with views

Registering a view model factory with views instead of using a dependency injection container

Designing the user experience of a Windows Store business app using C#, XAML, and Prism

Making key decisions

AdventureWorks Shopper user experiences

Deciding the user experience goals

Deciding the app flow

Deciding what Microsoft Windows features to use

Deciding how to monetize the app

Making a good first impression

Validating the design

Using the Model-View-ViewModel (MVVM) pattern in a Windows Store business app using C#, XAML, and Prism

Making key decisions

MVVM in AdventureWorks Shopper

What is MVVM?

Using a dependency injection container

Bootstrapping an MVVM app using Prism's MvvmAppBase class

Using the ViewModelLocator class to connect view models to views

Using a convention-based approach to connect view models to views

Other approaches to constructing view models and views

Creating a view model declaratively

Creating a view model programmatically

Creating a view defined as a data template

Updating a view in response to changes in the underlying view model or model

Additional considerations when implementing property change notification

UI interaction using the DelegateCommand class and Blend behaviors

Implementing command objects

Invoking commands from a view

Implementing behaviors to supplement the functionality of XAML elements

Invoking behaviors from a view

Additional MVVM considerations

Centralize data conversions in the view model or a conversion layer

Expose operational modes in the view model

Keep views and view models independent

Use asynchronous programming techniques to keep the UI responsive

Creating and navigating between pages in a Windows Store business app using C#, XAML, and Prism

Making key decisions

Creating pages and navigating between them in AdventureWorks Shopper

Creating pages

Adding design time data

Supporting multiple view states

Creating a custom GridView control that responds to layout changes

Creating a custom GridView control that displays items at multiple sizes

Styling controls

Enabling page localization

Separate resources for each locale

Ensure that each piece of text that appears in the UI is defined by a string resource

Add contextual comments to the app resource file

Define the flow direction for all pages

Ensure error messages are read from the resource file

Enabling page accessibility

Navigating between pages

Handling navigation requests

Navigating to the hub page when AdventureWorks Shopper is activated

Invoking navigation using behaviors

Using touch in a Windows Store business app using C# and XAML

Making key decisions

Touch in AdventureWorks Shopper

Tap for primary action

Slide to pan

Swipe to select, command, and move

Pinch and stretch to zoom

Swipe from edge for app commands

Swipe from edge for system commands

Validating user input in a Windows Store business app using C#, XAML, and Prism

Making key decisions

Validation in AdventureWorks Shopper using Prism

Specifying validation rules

Triggering validation when properties change

Triggering validation of all properties

Triggering server-side validation

Highlighting validation errors with behaviors

Persisting user input and validation errors when the app suspends and resumes

Managing application data in a Windows Store business app using C#, XAML, and Prism

Making key decisions

Managing application data in AdventureWorks Shopper

Storing data in the app data stores

Local application data

Roaming application data

Storing and roaming user credentials

Temporary application data

Exposing settings through the Settings charm

Creating data transfer objects

Accessing data through a web service

Consuming data

Exposing data

Data formats

Consuming data from a web service using DTOs

Caching data from a web service

Authenticating users with a web service

Handling suspend, resume, and activation in a Windows Store business app using C#, XAML, and Prism

Making key decisions

Suspend and resume in AdventureWorks Shopper

Understanding possible execution states

Implementation approaches for suspend and resume

Suspending an app

Saving view model state

Saving view state

Saving state from service and repository classes

Resuming an app

Activating an app

Restoring view model state

Restoring view state

Restoring state from service and repository classes

Other ways to close the app

Communicating between loosely coupled components in a Windows Store business app using C#, XAML, and Prism

Making key decisions

Event aggregation in AdventureWorks Shopper

Event aggregation

Defining and publishing pub/sub events

Defining an event

Publishing an event

Subscribing to events

Default subscription

Subscribing on the UI thread

Subscription filtering

Subscribing using strong references

Unsubscribing from pub/sub events

Working with tiles in a Windows Store business app using C#, XAML, and Prism

Making key decisions

Tiles in AdventureWorks Shopper

Creating app tiles

Using periodic notifications to update tile content

Creating secondary tiles

Launching the app from a secondary tile

Implementing search in a Windows Store business app using C#, XAML, and Prism

Making key decisions

Search in AdventureWorks Shopper

Adding search functionality

Providing query suggestions

Responding to search queries

Populating the search results page with data

Navigating to the result's detail page

Enabling users to type into the search box

Improving performance in a Windows Store business app using C# and XAML

Making key decisions

Performance considerations

Limit the startup time

Emphasize responsiveness

Trim resource dictionaries

Optimize the element count

Reuse identical brushes

Use independent animations

Minimize the communication between the app and the web service

Limit the amount of data downloaded from the web service

Use UI virtualization

Use the IncrementalUpdateBehavior to implement incremental loading

Avoid unnecessary termination

Keep your app's memory usage low when it's suspended

Reduce battery consumption

Minimize the amount of resources that your app uses

Limit the time spent in transition between managed and native code

Reduce garbage collection time

Testing and deploying Windows Store business apps using C#, XAML, and Prism

Making key decisions

Testing AdventureWorks Shopper

Unit and integration testing

Testing synchronous functionality

Testing asynchronous functionality

Suspend and resume testing

Security testing

Localization testing

Accessibility testing

Performance testing

Device testing

Testing your app with the Windows App Certification Kit

Creating a Windows Store certification checklist

Deploying and managing Windows Store apps

Meet the AdventureWorks Shopper and Prism team

Meet the team

Quickstarts for Windows Store business apps using C#, XAML, and Prism

Validation Quickstart for Windows Store apps using C#, XAML, and Prism

Building and running the Quickstart

Solution structure

Key classes in the Quickstart

Specifying validation rules

Triggering validation explicitly

Triggering validation implicitly on property change

Highlighting validation errors

Event aggregation Quickstart for Windows Store apps using C#, XAML, and Prism

Building and running the Quickstart

Solution structure

Key classes in the Quickstart

Defining the ShoppingCartChangedEvent class

Notifying subscribers of the ShoppingCartChangedEvent

Registering to receive notifications of the ShoppingCartChangedEvent

Bootstrapping an MVVM Windows Store app Quickstart using C#, XAML, and Prism

Building and running the Quickstart

Solution structure

Key classes in the Quickstart

Bootstrapping an MVVM app using the MvvmAppBase class

Adding app specific startup behavior to the App class

Bootstrapping without a dependency injection container

Extended splash screen Quickstart for Windows Store apps using C#, XAML, and Prism

Building and running the Quickstart

Solution structure

Key classes in the Quickstart

Creating the extended splash screen

Responding to resize and image opened events for the extended splash screen

Displaying the extended splash screen and launching additional loading tasks

Incremental loading Quickstart for Windows Store apps using C# and XAML

Building and running the Quickstart

Solution structure

Using the Blend IncrementalUpdateBehavior to add incremental loading

Handling the ContainerContentChanging event in code-behind

Prism for the Windows Runtime reference

Microsoft.Practices.Prism.StoreApps library

Microsoft.Practices.Prism.PubSubEvents library