Slow and steady Silverlight (34)

Source: Internet
Author: User
Tags xmlns silverlight

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>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.