Navigate Frame to a xaml document : Frame « Windows Presentation Foundation « C# / CSharp Tutorial






<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    x:Class="FrameWindowSample.SDKViewerWindow"
    Title="SDK Viewer" Width="430" Height="400">
    <StackPanel Margin="10,10,10,10">
        <TextBlock>
            <Hyperlink Name="homeHyperlink" Click="homeHyperlink_Click">Home</Hyperlink>
        </TextBlock>
        <Frame Name="sdkFrame" Background="WhiteSmoke" Source="SDKFramePage.xaml" NavigationUIVisibility="Visible" />
       
    </StackPanel>
</Window>

//File:Window.xaml.cs

using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace FrameWindowSample
{
    public partial class SDKViewerWindow : Window
    {

        public SDKViewerWindow()
        {
            InitializeComponent();
        }
        
        void homeHyperlink_Click(object sender, RoutedEventArgs e) {
            this.sdkFrame.Navigate(new Uri("SDKFramePage.xaml", UriKind.Relative));
        }

    }
}
WPF Navigate Frame To A Xaml Document








24.64.Frame
24.64.1.Use Frame to Load another Xaml fileUse Frame to Load another Xaml file
24.64.2.Frame Navigation Demo WindowFrame Navigation Demo Window
24.64.3.Xaml frame on a TabXaml frame on a Tab
24.64.4.Use a Frame control to navigate to Web pages and a Extensible Application Markup Language (XAML) page.Use a Frame control to navigate to Web pages and a Extensible Application Markup Language (XAML) page.
24.64.5.Put a Frame tag onto a Window to host a pagePut a Frame tag onto a Window to host a page
24.64.6.Navigate Frame to a xaml documentNavigate Frame to a xaml document
24.64.7.Navigate Frame to a URLNavigate Frame to a URL
24.64.8.Get the Resize Frame Vertical Border Width
24.64.9.Get the Resize Frame Horizontal Border Height