Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace: http://schemas.microsoft.com/winfx/2006/xaml/presentation
/** @attribute ContentPropertyAttribute("Content") */ public class Page extends FrameworkElement implements IAddChild
ContentPropertyAttribute("Content") public class Page extends FrameworkElement implements IAddChild
Page encapsulates a page of content that can be navigated, and has the following key members:
Lifetime Management: KeepAlive.
A page can be defined using markup, markup and code-behind, or code, and is the preferred way to package content for navigation, because it:
Is easy to define, reuse and manage.
Can access and use the NavigationService that navigated to it.
Can alter the title, width, height, and navigation UI of its host window (WindowTitle, WindowWidth, WindowHeight, ShowsNavigationUI).
Has designer support in Microsoft Visual Studio.
The direct child of a Window, NavigationWindow, Frame, UserControl root element in XAML.
Created as a page instance and set as the value of the Content property of Window, NavigationWindow, Frame, UserControl (for either markup and code-behind pages or code pages).
Set as the uniform resource identifier (URI) source of the Source property of either NavigationWindow or Frame (for either markup pages or markup and code-behind pages).
Set as the StartupUri in an XBAP, which causes Application to navigate Internet Explorer to the specified page.
An application typically has two or more pages, which can be navigated between using the following mechanisms:
Declaratively by using Hyperlink.
Programmatically by using NavigationService.
Visually by using the navigation UI of the host, including Windows Internet Explorer, NavigationWindow, and Frame.
The following example shows how a standard page is defined using only markup:
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" Title="Markup Page"> <!-- Page Content Goes Here --> </Page>
The following example shows how a standard page is defined using only code:
The following example shows how a standard page is defined using a combination of markup and code-behind.
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="MarkupAndCodeBehindPage" Title="Markup And Code-Behind Page"> <!-- Page Content Goes Here --> </Page>
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter EditionThe Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.