Part 1: The basics of navigation
This exercise requires (everything is free and will remain) :
1 - VS2008 SP1 (including Sql Express 2008)
2 - Silverlight 3.0
3 -. NET RIA Services July'09 Preview (for this exercise, this is optional)
The English original is available here: Part 1: Navigation Basics
Today we will talk about the professional appearance.
Professional Appearance
Business applications must be professional, but how many of us have a full time designer to our work? I guess very few. That is why we invested much effort for a quick start. Silverlight projects and Navigation Application and Silverlight Business Application (which adds support login / délogin) start with a standardized application structure, a "look and feel nice and very easy to modify, even for a developer.
- Under Visual Studio, click New Project and select Silverlight Business Application.
- Press F5 to run the project. A window then appears asking you whether to modify the web.config file. Select Modify and click OK.
- You should get something like this:
We obtain a Silverlight application fully functional (though it does little to yet). Notice the navigation links (home and about).
Note that the next and previous buttons work perfectly.
Also note the deep connection that points exactly where you are in the Silverlight application.
You can copy and paste into a website, a bog, a mail or otherwise and the recipient of the message will be directed at exactly the same point of application. And that, whatever the browser used.
Sometimes even the best developers make mistakes in their applications. The links that are invalid or errors generate exceptions. Model Navigation Application or Business Application offers a very easy way to manage them. Type a wrong URL in your application and an error window will appear.
Now proceed with some modifications.
First, add a new page.
Right-click on Views in the client project and select Add New Item, select Silverlight page. Give it a name or leave the default (for this example, it is better to appoint MaPremierePage).
When the page is opened, insert the following code just before the closing tag of the grid.
Now, we connect this Page navigation menu. In the file MainPage.xaml add a new button in the same format as those already present.
Now, as we are, will customize the template window error message. Open View / ErrorWindow.xaml. You can change the format, save the error log on the server or customize the text that end users will appear.
Now, let's change the title of the site. First, in MainPage.xaml, change the name "Application Name" Super Placement Service Employees.
Finally, change the color of the banner at the top to match the image of your company. Open Style.xaml in the Assets folder. This file contains all the style definitions for your application. We will see that it is easy even for a developer to change the appearance of a site.
Press F5 and that's what you should get:
As you can see, my choices of colors are not very good. However, full styles are available. Simply replace the file in the folder Styles.xaml Assets by those who are offered here:
http://timheuer.com/blog/archive/2009/07/09/free-silverlight-application- free-silverlight-3.aspx
Aurora
Frosted Cinnamon Toast:
Lime Shocker:
Pinky
Retro:
Skyline:
0 comments:
Post a Comment