Class Frame
Represents a content control that supports navigation.
Implements
Inherited Members
Namespace: System.Windows.Controls
Assembly: OpenSilver.Controls.Navigation.dll
Syntax
[TemplatePart(Name = "NextButton", Type = typeof(ButtonBase))]
[TemplatePart(Name = "PrevButton", Type = typeof(ButtonBase))]
public class Frame : ContentControl, IControl, IFrameworkElement, IUIElement, IDependencyObject, INavigate
Constructors
| Improve this Doc View SourceFrame()
Initializes a new instance of the Frame class.
Declaration
public Frame()
Fields
| Improve this Doc View SourceCacheSizeProperty
The DependencyProperty for the CacheSize property.
Declaration
public static readonly DependencyProperty CacheSizeProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
CanGoBackProperty
The DependencyProperty for the CanGoBack property.
Declaration
public static readonly DependencyProperty CanGoBackProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
CanGoForwardProperty
The DependencyProperty for the CanGoForward property.
Declaration
public static readonly DependencyProperty CanGoForwardProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
ContentLoaderProperty
The DependencyProperty for the ContentLoader property.
Declaration
public static readonly DependencyProperty ContentLoaderProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
CurrentSourceProperty
The DependencyProperty for the CurrentSource property.
Declaration
public static readonly DependencyProperty CurrentSourceProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
JournalOwnershipProperty
The DependencyProperty for the JournalOwnership property.
Declaration
public static readonly DependencyProperty JournalOwnershipProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
SourceProperty
The DependencyProperty for the Source property.
Declaration
public static readonly DependencyProperty SourceProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
UriMapperProperty
The DependencyProperty for the UriMapper property.
Declaration
public static readonly DependencyProperty UriMapperProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
Properties
| Improve this Doc View SourceCacheSize
Gets or sets the number of pages that can be cached for the frame.
Declaration
public int CacheSize { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
CanGoBack
Gets a value that indicates whether there is at least one entry in the back navigation history.
Declaration
public bool CanGoBack { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
CanGoForward
Gets a value that indicates whether there is at least one entry in the forward navigation history.
Declaration
public bool CanGoForward { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
ContentLoader
Gets or sets whether a frame is responsible for managing its own navigation history, or whether it integrates with the web browser journal.
Declaration
public INavigationContentLoader ContentLoader { get; set; }
Property Value
| Type | Description |
|---|---|
| INavigationContentLoader |
CurrentSource
Gets the uniform resource identifier (URI) of the content that was last navigated to.
Declaration
public Uri CurrentSource { get; }
Property Value
| Type | Description |
|---|---|
| System.Uri |
Remarks
This value may be different from Source if you set Source and the navigation has not yet completed. CurrentSource reflects the page currently in the frame at all times, even when an async loading operation is in progress.
JournalOwnership
Gets or sets whether a frame is responsible for managing its own navigation history, or whether it integrates with the web browser journal.
Declaration
public JournalOwnership JournalOwnership { get; set; }
Property Value
| Type | Description |
|---|---|
| JournalOwnership |
Source
Gets or sets the uniform resource identifier (URI) of the current content or the content that is being navigated to.
Declaration
public Uri Source { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Uri |
Remarks
This value may be different from CurrentSource if you set Source and the navigation has not yet completed. CurrentSource reflects the page currently in the frame at all times, even when an async loading operation is in progress.
UriMapper
Gets or sets the object to manage converting a uniform resource identifier (URI) to another URI for this frame.
Declaration
public UriMapperBase UriMapper { get; set; }
Property Value
| Type | Description |
|---|---|
| UriMapperBase |
Methods
| Improve this Doc View SourceGoBack()
Navigates to the most recent entry in the back navigation history, if one exists.
Declaration
public void GoBack()
GoForward()
Navigates to the most recent entry in the forward navigation history, if one exists.
Declaration
public void GoForward()
Navigate(Uri)
Navigates to the content specified by the uniform resource identifier (URI).
Declaration
public bool Navigate(Uri source)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Uri | source | The URI representing a page to display in the frame. |
Returns
| Type | Description |
|---|---|
| System.Boolean | Always returns true. |
OnApplyTemplate()
Called when the template generation for the visual tree is created.
Declaration
public override void OnApplyTemplate()
Overrides
| Improve this Doc View SourceOnCreateAutomationPeer()
Returns a FrameAutomationPeer for use by the Silverlight automation infrastructure.
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
| Type | Description |
|---|---|
| AutomationPeer | A FrameAutomationPeer for the Frame object. |
Overrides
| Improve this Doc View SourceRefresh()
Refreshes the current page
Declaration
public void Refresh()
StopLoading()
Stops further downloading of content for the current navigation request.
Declaration
public void StopLoading()
Events
| Improve this Doc View SourceFragmentNavigation
Occurs when navigation to a content fragment begins.
Declaration
public event FragmentNavigationEventHandler FragmentNavigation
Event Type
| Type | Description |
|---|---|
| FragmentNavigationEventHandler |
Navigated
Occurs when the content that is being navigated to has been found and is available.
Declaration
public event NavigatedEventHandler Navigated
Event Type
| Type | Description |
|---|---|
| NavigatedEventHandler |
Navigating
Occurs when a new navigation is requested.
Declaration
public event NavigatingCancelEventHandler Navigating
Event Type
| Type | Description |
|---|---|
| NavigatingCancelEventHandler |
NavigationFailed
Occurs when an error is encountered while navigating to the requested content.
Declaration
public event NavigationFailedEventHandler NavigationFailed
Event Type
| Type | Description |
|---|---|
| NavigationFailedEventHandler |
NavigationStopped
Occurs when the StopLoading() method is called, or when a new navigation is requested while the current navigation is in progress.
Declaration
public event NavigationStoppedEventHandler NavigationStopped
Event Type
| Type | Description |
|---|---|
| NavigationStoppedEventHandler |