Table of Contents

Class XamlLessFrame

Namespace
WindowSill.API
Assembly
WindowSill.API.dll

Represents a Frame that can navigate to pages without requiring XAML definitions.

public class XamlLessFrame : ContentControl, IEquatable<DependencyObject>, IAnimationObject, IVisualElement, IVisualElement2, IEquatable<UIElement>, IEquatable<FrameworkElement>, IEquatable<Control>, IWinRTObject, IUnmanagedVirtualMethodTableProvider, IDynamicInterfaceCastable, IEquatable<ContentControl>
Inheritance
XamlLessFrame
Implements
IWinRTObject
Inherited Members
Extension Methods

Constructors

XamlLessFrame()

Initializes a new instance of the XamlLessFrame class.

public XamlLessFrame()

Fields

CanGoBackProperty

Identifies the CanGoBack dependency property.

public static readonly DependencyProperty CanGoBackProperty

Field Value

DependencyProperty

CanGoForwardProperty

Identifies the CanGoForward dependency property.

public static readonly DependencyProperty CanGoForwardProperty

Field Value

DependencyProperty

IsNavigationStackEnabledProperty

Identifies the IsNavigationStackEnabled dependency property.

public static readonly DependencyProperty IsNavigationStackEnabledProperty

Field Value

DependencyProperty

SourcePageTypeProperty

Identifies the SourcePageType dependency property.

public static readonly DependencyProperty SourcePageTypeProperty

Field Value

DependencyProperty

Properties

BackStack

Gets a collection of PageStackEntry instances representing the back navigation history of the Frame.

public IList<PageStackEntry> BackStack { get; }

Property Value

IList<PageStackEntry>

CanGoBack

Gets a value that indicates whether there is at least one entry in back navigation history.

public bool CanGoBack { get; }

Property Value

bool

CanGoForward

Gets a value that indicates whether there is at least one entry in forward navigation history.

public bool CanGoForward { get; }

Property Value

bool

ForwardStack

Gets a collection of PageStackEntry instances representing the forward navigation history of the Frame.

public IList<PageStackEntry> ForwardStack { get; }

Property Value

IList<PageStackEntry>

IsNavigationStackEnabled

Gets or sets a value that indicates whether navigation is recorded in the Frame's BackStack or ForwardStack.

public bool IsNavigationStackEnabled { get; set; }

Property Value

bool

SourcePageType

Gets the data type of the current content, or the content that should be navigated to.

public Type? SourcePageType { get; }

Property Value

Type

Methods

GoBack()

Navigates to the most recent item in back navigation history, if a Frame manages its own navigation history.

public bool GoBack()

Returns

bool

true if navigation was successful; otherwise, false.

GoBack(NavigationTransitionInfo?)

Navigates to the most recent item in back navigation history, if a Frame manages its own navigation history, and specifies the animated transition to use.

public bool GoBack(NavigationTransitionInfo? transitionInfoOverride)

Parameters

transitionInfoOverride NavigationTransitionInfo

Info about the animated transition to use.

Returns

bool

true if navigation was successful; otherwise, false.

GoForward()

Navigates to the most recent item in forward navigation history, if a Frame manages its own navigation history.

public bool GoForward()

Returns

bool

true if navigation was successful; otherwise, false.

Navigate(Type)

Causes the XamlLessFrame to load content represented by the specified XamlLessPage-derived data type.

public bool Navigate(Type sourcePageType)

Parameters

sourcePageType Type

The page type to navigate to, specified as a type reference to the source content.

Returns

bool

true if navigation was successful; otherwise, false.

Navigate(Type, object?)

Causes the XamlLessFrame to load content represented by the specified XamlLessPage-derived data type, also passing a parameter to be interpreted by the target of the navigation.

public bool Navigate(Type sourcePageType, object? parameter)

Parameters

sourcePageType Type

The page type to navigate to, specified as a type reference to the source content.

parameter object

The navigation parameter to pass to the target page.

Returns

bool

true if navigation was successful; otherwise, false.

Navigate(Type, object?, NavigationTransitionInfo?)

Causes the XamlLessFrame to load content represented by the specified XamlLessPage-derived data type, also passing a parameter to be interpreted by the target of the navigation and a value indicating the animated transition to use.

public bool Navigate(Type sourcePageType, object? parameter, NavigationTransitionInfo? infoOverride)

Parameters

sourcePageType Type

The page type to navigate to, specified as a type reference to the source content.

parameter object

The navigation parameter to pass to the target page.

infoOverride NavigationTransitionInfo

Info about the animated transition.

Returns

bool

true if navigation was successful; otherwise, false.

Events

Navigated

Occurs when the content that is being navigated to has been found and is available, although it may not have completed loading.

public event EventHandler<XamlLessNavigationEventArgs>? Navigated

Event Type

EventHandler<XamlLessNavigationEventArgs>

Navigating

Occurs when a new navigation is requested.

public event EventHandler<XamlLessNavigatingCancelEventArgs>? Navigating

Event Type

EventHandler<XamlLessNavigatingCancelEventArgs>

NavigationFailed

Occurs when an error is raised while navigating to the requested content.

public event EventHandler<XamlLessNavigationFailedEventArgs>? NavigationFailed

Event Type

EventHandler<XamlLessNavigationFailedEventArgs>

NavigationStopped

Occurs when a new navigation is requested while a current navigation is in progress.

public event EventHandler<XamlLessNavigationStoppedEventArgs>? NavigationStopped

Event Type

EventHandler<XamlLessNavigationStoppedEventArgs>