Today, we need to talk about the UI specialization...
To create business applications for enterprises, we certainly need to present professional uidesign to our customers. But how many of our teams have a professional full-time artist? This is why we try our best to prepare some "out-of-the-box" UI templates for users. Silverlight navigation application and Silverlight business application (the login/logout function is added on the previous one) provide a clean and standardized application architecture by default. It looks beautiful, and it is easy to maintain and customize for developers.
File \ new project-Silverlight business applications
Press F5
This is a fully framework-based Silverlight application. Note the home and about navigation links.
Look, the browser's forward and backward are just as easy to use...
Silverlight3 provides support for deep links. You can copy these links and send them to your team members through blogs, emails, or instant messaging tools. When they click this link, they can navigate to the exact position of this deep link in the application.
... Consistent performance in any browser...
If there is no perfect person, experienced developers will inevitably make some mistakes. For example, if the link is incorrect or the application throws unexpected exceptions. The default template provided by the navigation application makes it easy to handle such problems. Try typing an incorrect URL at will:
Next, let's talk about customization (personalization ).
First, we add a new page
Right-click the views folder of the current Silverlight project in solution, click Add new item, and select Silverlight page
Open the newly added page and create some simple stuff.
<TextBlock Text="Hello World!"></TextBlock>
Now, we associate it with the menu on the main navigation page. In mainpage. XAML, add a button according to the existing navigation button definition.
<HyperlinkButton Style="{StaticResource LinkStyle}" NavigateUri="/MyFirstPage" TargetName="ContentFrame" Content="my page"/>
Next, let's customize the default error Prompt window... Open views \ errorwindo. XAML for processing. Here you can make some specific changes, such as changing the corresponding output format, logging to the server or custom exception prompt information.
<TextBlock x:Name="IntroductoryText" Grid.Row="0" Margin="0" Text="An unknown error was encountered. Please contact Forever anytime day or night (123) 332-9801 for more information." Width="398" TextWrapping="Wrap" HorizontalAlignment="Left"/>
Well, it's not bad. Now we need to change the site ID. In mainpage. XAML, change "Application name" to the name you want, such as "4 MVC team group number: 1215279" (super obvious advertisement ).
<Textblock X: Name = "applicationnametextblock" style = "{staticresource applicationnamestyle}" text = "4 MVC team ID: 1215279"/>
Finally, we made some changes to the color. Open styles. XAML in the assets folder and put all existing styles there for you to define. Here we will make some changes to attributes that are common and familiar to developers.
Click F5 to see the results...
Well... As you can see, the colors I have come up with do not look so bad.
We also provide a series of "out-of-the-box" app. XAML for everyone to choose from. They are doing well in Vs and blend.
The following are some provided style templates:
Http://timheuer.com/blog/archive/2009/07/09/free-silverlight-application-themes-silverlight-3.aspx
Aurora (for the RIA services template version ):
Frosted Cinnamon Toast:
Lime shocker (for the RIA services template version ):
Pinky (for the RIA services template version ):
Retro:
Skyline:
Subdued: