Class Navigator
Represents a navigator that can navigate a hierarchy of views using routes and display dialogs for an application or window.
Namespace: Singulink.UI.Navigation
Assembly: Singulink.UI.Navigation.WinUI.dll
Syntax
public class Navigator : INavigator, IDialogNavigatorBase, INotifyPropertyChanged
Remarks
Navigator instances are not thread-safe and should only be accessed from the UI thread. Attempting to access methods or properties from a non-UI thread will result in an InvalidOperationException being thrown.
Constructors
Name | Description |
---|---|
Navigator(ContentControl, Action<NavigatorBuilder>) | Initializes a new instance of the Navigator class with the specified root content control and mappings provided in the build action. |
Navigator(Panel, Action<NavigatorBuilder>) | Initializes a new instance of the Navigator class with the specified root panel and mappings provided in the build action. |
Navigator(IViewNavigator, Action<NavigatorBuilder>) | Initializes a new instance of the Navigator class with the specified root view navigator and mappings provided in the build action. |
Properties
Name | Description |
---|---|
CanUserGoBack | Gets a value indicating whether the navigator can navigate back to the previous view from a user-initiated request. This property can be used to bind the enabled state of a back button in the UI. |
CanUserGoForward | Gets a value indicating whether the navigator can navigate forward to the next view from a user-initiated request. This property can be used to bind the enabled state of a forward button in the UI. |
CanUserRefresh | Gets a value indicating whether the navigator can refresh the current view from a user-initiated request. This property can be used to bind the enabled state of a refresh button or "pull to refresh" feature in the UI. |
HasBackHistory | Gets a value indicating whether the navigator has back history. This property should be checked prior to doing a programmatic back navigation. |
HasForwardHistory | Gets a value indicating whether the navigator has forward history. This property should be checked prior to doing a programmatic forward navigation. |
IsNavigating | Gets a value indicating whether the navigator is currently in the process of navigating to a new view. |
IsShowingDialog | Gets a value indicating whether the navigator is currently showing a dialog. |
Methods
Events
Name | Description |
---|---|
PropertyChanged | Occurs when a property value changes. |