This walkthrough shows how to create ClientUI MVVM Application project with Intersoft ClientUI MVVM Application project template.
This walkthrough demonstrates the following tasks:
- Create a ClientUI MVVM Project using Intersoft MVVM project template.
- Explain the files within Intersoft ClientUI MVVM project.
- Explain the files within Intersoft ClientUI MVVM Application web site project.
Prerequisites
You need the following components to complete this walkthrough:
- Silverlight version 4
- Silverlight 4 Tools for Visual Studio 2010
- Visual Studio 2010
- Intersoft ClientUI
Creating a new ClientUI MVVM Project
The new ClientUI MVVM application project is created by using the Intersoft ClientUI MVVM Application project template. Use the following steps to create a new ClientUI MVVM Application project.
To create a new ClientUI MVVM Application project
- Started 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# or the Visual Basic node and select Silverlight.
- In the list of templates, select Intersoft ClientUI MVVM 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.
The New Silverlight Application dialog box appears as shown in the following illustration.
- Select a method for hosting your Silverlight application.
- Uncheck the Host the Silverlight application in a new Web site check box if you do not want to use a Web site to host your Silverlight application. Instead, an HTML test page will be generated to host your application.
- Check the Host the Silverlight application in a new Web site check box if you want to add a separate ASP.NET Web site or ASP.NET Web Application Project to your solution to host the Silverlight application. If you select this option, you must also specify the New Web project name and New Web Project Type.
- From the Silverlight Version drop-down list, select the Silverlight version 4.
- Click the OK button.
Intersoft ClientUI MVVM Application Project Files
Intersoft ClientUI MVVM Application project contains the following configuration, assembly references, and code files:
- Intersoft ClientUI MVVM Application project contains references to the following assemblies:
- Intersoft.Client.Framework.dll
- Intersoft.Client.UI.Aqua.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.Core.dll
- System.Net.dll
- System.Windows.dll
- System.Windows.Browser.dll
- System.Windows.Controls.Navigation.dll
- System.Windows.Interactivity.dll
- System.Xml.dll
- Models folder which contains the following files
- ModelBase.cs
ModelBase class is inherit from INotifyPropertyChanged and IDataErrorInfo. MVVM Model pattern class can inherit this ModelBase class
- ViewModels folder which contains the following files
- DialogBoxServiceProvider.cs
This is the Intersoft DialogBox / Modal Window Service Provider class. This class is used when developer would like to show UXDialogBox.
- MessageBoxServiceProvider.cs
This is the Intersoft MessageBox Provider class. This class is used when developer would like to show UXMessageBox.
- NavigationServiceProvider.cs
This class is use when developer would like to perform navigation command.
- UXPage1ViewModel.cs
This class is the ViewModel of UXPage1.xaml
- ViewModelBase.cs
This class is inherit from INotifyPropertyChanged. MVVM ViewModel pattern class can inherit this ViewModelBase class
- Views folder which contains the following files
- UXPage1.xaml
This is the default XAML view in Intersoft ClientUI MVVM Application project.
- MainPage files
The MainPage class is used to create the user interface for the Silverlight application. The MainPage class derives from UserControl. You can implement the MainPage class by using MainPage.xaml for XAML markup and MainPage.xaml.cs for the code-behind.
- 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.
Intersoft ClientUI MVVM Application Project Web Site Files
If you check the Host the Silverlight application in a new Web site check box in the New Silverlight Application dialog box, an ASP.NET Web site is created and added to the Silverlight solution. 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 Intersoft ClientUI MVVM 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 Intersoft ClientUI MVVM Application project and the text "TestPage.aspx".
- Web.config
A Web site configuration file.
See Also