Frame..::.Source Property Home
.NET Framework Class Library for Silverlight
Frame..::.Source Property

[Note: This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Gets or sets the uniform resource identifier (URI) of the current content or the content that is being navigated to.

Namespace:  System.Windows.Controls
Assembly:  System.Windows.Controls.Navigation (in System.Windows.Controls.Navigation.dll)
Syntax

'Usage

Dim instance As Frame
Dim value As Uri

value = instance.Source

instance.Source = value

'Declaration

Public Property Source As Uri
    Get
    Set
<navigation:frame Source="uriString"/>

XAML Values

navigation:

A prefix that is defined to map the XML namespace for the System.Windows.Controls.Navigation assembly and the System.Windows.Controls CLR namespace.

Property Value

Type: System..::.Uri
A value that represents the URI of the current content or the content that is being navigated to.
Remarks

Dependency property identifier field: SourceProperty

When you set the Source property to a value that is different from the content being displayed, the frame navigates to the new content.

Examples

The following example shows the XAML for a frame that includes URI mapping definitions. The frame will navigate to the value of its Source property, which in this example is set by default to /Home.

<navigation:Frame 
       x:Name="ContentFrame" 
       Style="{StaticResource ContentFrameStyle}" 
       Source="/Home" 
       Navigated="ContentFrame_Navigated" 
       NavigationFailed="ContentFrame_NavigationFailed">
    <navigation:Frame.UriMapper>
        <uriMapper:UriMapper>
            <uriMapper:UriMapping 
                Uri="/ProductDetail/{productid}" 
                MappedUri="/Views/ProductDetail.xaml?ProductId={productid}"/>
            <uriMapper:UriMapping 
                Uri="/Reports/{type}/{selection}" 
                MappedUri="/Views/ReportsPage.xaml?type={type}&amp;selection={selection}"/>
            <uriMapper:UriMapping 
                Uri="/{pageName}" 
                MappedUri="/Views/{pageName}.xaml"/>
        </uriMapper:UriMapper>
    </navigation:Frame.UriMapper>
</navigation:Frame>
Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

See Also

Reference

Other Resources

© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View