INavigator
- Kind: Interface
- Namespace: SkeleKit
Methods
AlertAsync
Displays an alert dialog with a single button to dismiss it.
| Parameter | Summary |
|---|---|
string title | The title text of the alert. |
string message | The message body. |
(optional) string dismiss | The text for the dismiss button. |
Returns
Task: A task representing the async operation.
ConfirmAsync
Displays a confirmation dialog with accept and cancel actions.
| Parameter | Summary |
|---|---|
string title | The title text of the confirmation box. |
string message | The message body. |
(optional) string accept | The text for the confirming button. |
(optional) string cancel | The text for the canceling button. |
(optional) bool destructive | Whether the confirming button is styled red, for actions that discard something. |
Returns
DismissAsync
Dismisses the top-most active modal presentation layer.
Returns
Task: A task representing the async operation.
OpenUrlAsync
Opens a web address in an in-app Safari browser, with the system reader, share and done chrome.
| Parameter | Summary |
|---|---|
string url | The http or https address to open. |
Returns
Task: A task that completes once the browser is presented.
OpenUrlAsync
Opens a web address in an in-app Safari browser with custom presentation and browser options.
| Parameter | Summary |
|---|---|
string url | The http or https address to open. |
ModalStyle style | The modal style and sheet detents used to present the browser. |
(optional) bool entersReaderIfAvailable | Whether Safari should enter Reader mode when it is available. |
(optional) bool barCollapsingEnabled | Whether Safari's bars may collapse while browsing. |
(optional) SafariDismissButtonStyle dismissButtonStyle | The style of the browser's dismiss button. |
Returns
Task: A task that completes once the browser is presented.
PopAsync
Pops the top page off the current navigation stack.
Returns
Task: A task representing the async operation.
PopToRootAsync
Pops all pages off the stack except for the root page.
Returns
Task: A task representing the async operation.
PresentAsync
Presents a modal page, resolving its ViewModel from the service container.
| Parameter | Summary |
|---|---|
ModalStyle style | The modal style and presentation configuration. |
| Type parameter | Summary |
|---|---|
(class) TViewModel | The type of the ViewModel to resolve. |
Returns
Task: A task representing the async operation.
PresentAsync
Presents a modal page using an existing ViewModel instance.
| Parameter | Summary |
|---|---|
object viewModel | The ViewModel instance to bind to the page. |
ModalStyle style | The modal style and presentation configuration. |
Returns
Task: A task representing the async operation.
PresentAsync
Presents a modal page, resolving its ViewModel by type from the service container.
| Parameter | Summary |
|---|---|
Type viewModel | The type of the ViewModel to resolve. |
ModalStyle style | The modal style and presentation configuration. |
Returns
Task: A task representing the async operation.
PresentViewAsync
Presents a registered view, resolving any associated ViewModel from the service container.
| Parameter | Summary |
|---|---|
ModalStyle style | The modal style and presentation configuration. |
| Type parameter | Summary |
|---|---|
ContentView TView | The registered view type. |
Returns
Task: A task representing the async operation.
PresentViewAsync
Presents an existing page instance directly.
Create a new instance per navigation.
| Parameter | Summary |
|---|---|
ContentView page | The page to present. |
ModalStyle style | The modal style and presentation configuration. |
Returns
Task: A task representing the async operation.
PresentViewAsync
Presents a registered view by type, resolving any associated ViewModel from the service container.
| Parameter | Summary |
|---|---|
Type view | The registered view type. |
ModalStyle style | The modal style and presentation configuration. |
Returns
Task: A task representing the async operation.
PromptAsync
Displays an alert with a single text field, for a name or another short answer.
| Parameter | Summary |
|---|---|
string title | The title text of the alert. |
string message | The message body. |
(optional) string placeholder | The text field's placeholder. |
(optional) string text | The text the field starts with. |
(optional) string accept | The text for the confirming button. |
(optional) string cancel | The text for the canceling button. |
(optional) bool destructive | Whether the confirming button is styled as destructive. |
Returns
PushAsync
Pushes a new page onto the stack, resolving its ViewModel from the service container.
| Type parameter | Summary |
|---|---|
(class) TViewModel | The type of the ViewModel to resolve. |
Returns
Task: A task representing the async operation.
PushAsync
Pushes a new page onto the stack using an existing ViewModel instance.
| Parameter | Summary |
|---|---|
object viewModel | The ViewModel instance to bind to the page. |
Returns
Task: A task representing the async operation.
PushAsync
Pushes a new page onto the stack, resolving its ViewModel by type from the service container.
| Parameter | Summary |
|---|---|
Type viewModel | The type of the ViewModel to resolve. |
Returns
Task: A task representing the async operation.
PushViewAsync
Pushes a registered view, resolving any associated ViewModel from the service container.
| Type parameter | Summary |
|---|---|
ContentView TView | The registered view type. |
Returns
Task: A task representing the async operation.
PushViewAsync
Pushes an existing page instance directly.
Create a new instance per navigation.
| Parameter | Summary |
|---|---|
ContentView page | The page to push. |
Returns
Task: A task representing the async operation.
PushViewAsync
Pushes a registered view by type, resolving any associated ViewModel from the service container.
| Parameter | Summary |
|---|---|
Type view | The registered view type. |
Returns
Task: A task representing the async operation.
SelectAsync
Displays an action sheet layout with individually styled choices.
| Parameter | Summary |
|---|---|
string title | The action sheet's title. |
(optional) string cancel | The cancel button's text. |
DialogOption options | The options to choose from. |
Returns
Task<string?>: A task containing the chosen option's text, or null if the action sheet was canceled.
SelectTabAsync
Selects the tab with the given title, as declared on Tab(title, ...).
| Parameter | Summary |
|---|---|
string title | The tab's title. |
Returns
Task: A task representing the async operation.