Back to the "Steady Silverlight 3.0 series Article index"
Slow and steady Silverlight (34)-3.0 control Frame,page,label,descriptionviewer,validationsummary
Introduced
Silverlight 3.0 Control Overview:
Frame-Used in conjunction with Page controls for navigation (Deep linking can be implemented)
Page-Used in conjunction with the Frame control
Label-More than TextBlock functionality that can be used to prompt for incorrect validation information
Descriptionviewer-Prompt when the mouse passes
ValidationSummary-summarizes information for validation errors
Online Demo
Http://www.cnblogs.com/webabcd/archive/2009/08/04/1538238.html
Example
1, the use of Frame control demo. It can navigate the Page and can do URL mapping
Frame.xaml
<navigation:page x:class= "Silverlight30.Control.Frame"
xmlns:navigation= "Clr-namespace:system.windows.controls;assembly=system.windows.controls.navigation"
Xmlns:urimapper= "Clr-namespace:system.windows.navigation;assembly=system.windows.controls.navigation"
Xmlns= "Http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x= "Http://schemas.microsoft.com/winfx/2006/xaml"
Xmlns:d= "http://schemas.microsoft.com/expression/blend/2008"
Xmlns:mc= "http://schemas.openxmlformats.org/markup-compatibility/2006"
Mc:ignorable= "D"
D:designwidth= "640" d:designheight= "480"
title= "Frame Page" >
<grid x:name= "LayoutRoot" >
<stackpanel horizontalalignment= "Left" >
<border borderbrush= "Gray" borderthickness= "3" padding= "ten" >
<!--
Frame-Used in conjunction with Page controls for navigation (Deep linking can be implemented)
Source-The address of the Page that needs to be displayed in the Frame
Journalownership-How the navigation log is logged [System.Windows.Navigation.JournalOwnership enum]
Automatic-If the frame is the top-level frame, log the navigation log at the browser end, otherwise the frame will record itself
Ownsjournal-Self record
Usesparentjournal-When the frame is the top-level frame, it is logged by the browser. Throws an exception if it is a non-top-level Frame
Urimapper-uri Mapper. You can edit the mapping rules inside
Urimapping-specific mapping rules (under System.Windows.Navigation namespaces)
In this case, the address of a similar silverlight30testpage.aspx#/control/pagedemo is mapped to a similar Silverlight30testpage.aspx#/control/pagedemo.xaml 's Address
-->
<navigation:frame x:name= "Frame" source= "/control/pagedemo" journalownership= "ownsjournal" >
<navigation:Frame.Content>
<textblock text= "I am the Content of Frame"/>
</navigation:Frame.Content>
<navigation:Frame.UriMapper>
<uriMapper:UriMapper>
<urimapper:urimapping uri= "/{address}" mappeduri= "/{address}.xaml"/>
</uriMapper:UriMapper>
</navigation:Frame.UriMapper>
</navigation:Frame>
</Border>
<button x:name= "navigatetopagedemo" content= "link to Pagedemo" click= "Navigatetopagedemo_click" Width= "/>"
<button x:name= "navigateToPageDemo2" content= "link to PageDemo2" click= "Navigatetopagedemo2_click" width= "/>"
</StackPanel>
</Grid>
</navigation:Page>