This topic describes how to use Visual Studio 2010 to create and build a new Intersoft ClientUI MVVM business application project. The project will create an application with login and navigation feature.
Prerequisites
You need the following components to complete this walkthrough:
- Visual Studio 2010
- Silverlight 4 Tools for Visual Studio 2010
- Intersoft ClientUI
Intersoft ClientUI MVVM Business Application Project
A business application project is created by using the Intersoft ClientUI MVVM Business Application project template. Use the following steps to create a new business application project. The steps below are based on Visual C# project, similar steps is expected in using Visual Basic.
To create an Intersoft ClientUI MVVM business application project
- Start Visual Studio 2010.
- On the File menu, click New and then Project.
- The New Project dialog box appears.
- In the Installed Templates pane, expand the Visual C# node and select Silverlight.
- In the list of templates, select Intersoft ClientUI MVVM Business Application. The following illustration shows an example of the Silverlight project templates.
- Specify a Name and a Location for the application and then click OK.
- To build the Silverlight application project, in the Build menu, click Build Solution.
- To debug the Silverlight application project, in the Debug menu, click Start Debugging.
- To run the Silverlight application project, in the Debug menu, click Start Without Debugging.
Intersoft ClientUI MVVM Business Application Project Files
An Intersoft ClientUI desktop application project contains the following configuration, assembly references, and code files:
- AppManifest.xml
This is the application manifest file that is required to generate the application package. You must not edit this file.
- AssemblyInfo.cs
This file contains the name and version metadata that is embedded into the generated assembly.
- .xap file
This is the Silverlight application package. It is generated when the Silverlight application project is built. An application package is a compressed zip file that has a .xap file extension and contains all the files that you need to start your application.
- The project contains references to the following assemblies:
- Intersoft.Client.Framework.dll
- Intersoft.Client.UI.Aqua.dll
- Intersoft.Client.UI.Aqua.UXCollection.dll
- Intersoft.Client.UI.Aqua.UXDesktop.dll
- Intersoft.Client.UI.Controls.dll
- Intersoft.Client.UI.Controls.Interactivity.dll
- Intersoft.Client.UI.Navigation.dll
- mscorlib.dll
- System.dll
- System.ComponentModel.DataAnnotations.dll
- System.Core.dll
- System.Net.dll
- System.Runtime.Serialization
- System.ServiceModel
- System.ServiceModel.DomainServices.Client
- System.ServiceModel.DomainServices.Client.Web
- System.ServiceModel.Web.Extensions
- System.Windows.dll
- System.Windows.Browser.dll
- System.Windows.Controls.Navigation
- System.Windows.Interactivity
- System.Xml.dll
- MainPage files
The MainPage class is used as the root visual in the Intersoft ClientUI MVVM Business application. The MainPage contains UXNavigationBar, UXFrame, and UXItemsControl. UXItemsControl holds the page link which is navigated in the UXFrame.
- ErrorPage files
The ErrorPage is used as the default error page when an exception is thrown in the application.
- SAFMetadata file
This file is used to define the ApplicationPackage for this project.
- App files
The App class is required by a Silverlight application to display the application user interface. The App class is implemented by using App.xaml and App.xaml.cs. The App class is instantiated by the Silverlight plug-in after the application package (.xap file) is created.
- Assets folder
This folder contains the images and styles used in the pages in MainPage and Views folder. Static string used by the application is also defined in the resources located in this folder.
- Helpers folder
This folder contains a ApplicationResources.cs helper class used to load the static string resources.
- Models folder
This folder contains the required Model used in this project.
- RegistrationDataExtension.cs
RegistrationData extension class which hold password validation functionality.
- ModelBase.cs
Default abstract Model class which implements INotifyPropertyChanged and IDataErrorInfo interface. Model classes in this folder should inherit this class.
- ViewModels folder
This folder contains the required ViewModel used in this project and helper classes for MessageBox and DialogBox.
- LoginFormViewModel.cs
- RegisterFormViewModel.cs
- DialogBoxServiceProvider.cs
Helper class which encapsulates basic methods to show a dialog box.
- MessageBoxServiceProvider.cs
Helper class which encapsulate basic methods to show a message box.
- NavigationServiceProvider.cs
Helper class which encapsulate method for navigating.
- ValidationViewModelBase.cs
Abstract ViewModel class which implements INotifyPropertyChanged and IDataErrorInfo interface, implemented by ViewModel classes which require validation.
- ViewModelBase.cs
Abstract ViewModel class which implements INotifyPropertyChanged interface.
- Views folder
This folder contains the pages linked from UXItemControl in MainPage. The Login folder contains the interface for login and a register form.
- Login folder
Contains Login and Register form which used the LoginFormViewModel and RegisterFormViewModel.
- About file
The About class derives from UXPage.
- Customers file
The AboutNotepad class derives from UXPage. The page requires user to login to view the content.
- Home file
The Home class derives from UXPage. This page is shown on application initial load.
- Product file
The Product class derives from UXPage. The page requires user to have a Product Manager role to view the content.
- Reports file
The Reports class derives from UXPage. The page requires user to have an Administrator role to view the content.
- Settings file
The Settings class derives from UXPage.
Intersoft ClientUI MVVM Business Application Project Web Site Files
The Web site contains the following files:
- Silverlight.js
A JavaScript helper file that contains functions to initialize Silverlight plug-in instances and functions for determining the client's installed version of the plug-in.
- HTML file
An HTML file that is used to configure and instantiate the Silverlight plug-in, which downloads and runs the Silverlight application. The name of this file is a concatenation of the name of the Silverlight application project and the text "TestPage.html".
- .aspx file
A .aspx file that is the default startup Web page. The name of this file is a concatenation of the name of the Silverlight application project and the text "TestPage.aspx".
- Web.config
A Web site configuration file.
- Resources folder
This folder contains a class used to define static string resources required by the application.
- Services folder
Contains class which define method for database operation. The database will be created automatically by the project upon the first database operation.
- Models folder
Object class which hold data entity information from its respective table in the database.
See Also