ContentView

A full screen: compose its tree into Content in the constructor.
public abstract class ContentView : Panel

Properties

BackButtonStyle

How the next pushed page's back button represents this page.

Type: BackButtonStyle

public BackButtonStyle BackButtonStyle { get; set; }

BackButtonTitle

The back button title the next pushed page shows, or null for this page's title.

Type: string?

public string? BackButtonTitle { get; set; }

BackgroundStyle

The page's background style.

Type: PageBackground

public PageBackground BackgroundStyle { get; set; }

BarTint

The tint for this page's bar buttons and back button, or null for the app tint.

Type: Color?

public Color? BarTint { get; set; }

BottomToolbarItems

Buttons along the screen's bottom edge.

The toolbar stays hidden while a tab bar occupies the bottom edge. A pushed page can set HidesTabBar to show its bottom toolbar in place of the tab bar.

Type: IList<ToolbarItem>

public IList<ToolbarItem> BottomToolbarItems { get; }

ConfirmLeave

Asked before the page is left, so unsaved changes can veto leaving.

Fires for the back button, a sheet swipe or a popover tap-out; return false to stay.

Leave it null while nothing needs guarding, which also disables the interactive pop-back swipe.

Type: Func<Task<bool>>?

public Func<Task<bool>>? ConfirmLeave { get; set; }

Content

The page's element tree.

Type: View?

public View? Content { get; set; }

Controller

The native controller hosting this page, or null before it is presented.

Type: UIViewController?

public UIViewController? Controller { get; }

HidesNavigationBar

Hides the navigation bar for this page.

Type: bool

public bool HidesNavigationBar { get; set; }

HidesSearchBarWhenScrolling

Whether the search bar collapses into the bar as the content scrolls.

Type: bool

public bool HidesSearchBarWhenScrolling { get; set; }

HidesSearchScopesWhenEmpty

Whether search scopes stay hidden until the search field contains text.

Type: bool

public bool HidesSearchScopesWhenEmpty { get; set; }

HidesTabBar

Hides the tab bar while this page is on top of the stack.

Type: bool

public bool HidesTabBar { get; set; }

LargeTitleColor

The expanded large title's color, or null for the system default.

Type: Color?

public Color? LargeTitleColor { get; set; }

Prompt

The small line of text above the navigation title, or null for none.

Type: Bindable<string?>

public Bindable<string?> Prompt { get; set; }

SafeAreaEdges

Which edges the page keeps clear of the safe area.

Type: SafeAreaEdges

public SafeAreaEdges SafeAreaEdges { get; set; }

ScrollsUnderBars

Whether scrolling content passes under the navigation bar so the bar blurs over it.

Type: bool

public bool ScrollsUnderBars { get; set; }

SearchCanceled

Invoked when the user cancels out of the search field.

Type: Action?

public Action? SearchCanceled { get; set; }

SearchChanged

Invoked as the user types in the search field.

Type: Action<string>?

public Action<string>? SearchChanged { get; set; }

SearchCommand

Command invoked when the user submits the current search text.

Type: ICommand?

public ICommand? SearchCommand { get; set; }

SearchObscuresBackground

Whether the content dims behind an active search.

Type: bool

public bool SearchObscuresBackground { get; set; }

SearchPlaceholder

Placeholder for the navigation bar's search field.

Setting it shows the search bar.

Type: string?

public string? SearchPlaceholder { get; set; }

SearchScopeChanged

Invoked with the selected index when the user switches search scope.

Type: Action<int>?

public Action<int>? SearchScopeChanged { get; set; }

SearchScopeIndex

The selected search scope index.

Type: Bindable<int>

public Bindable<int> SearchScopeIndex { get; set; }

SearchScopes

Titles of the scope buttons under an active search field. Empty for none.

Type: IList<string>

public IList<string> SearchScopes { get; }

SearchText

The search field's text.

Type: Bindable<string>

public Bindable<string> SearchText { get; set; }

StatusBar

The status bar look for this page.

Type: StatusBarStyle

public StatusBarStyle StatusBar { get; set; }

TabBadge

The badge on this page's tab bar item, or null for none.

Applies before the tab is opened.

Type: Bindable<string?>

public Bindable<string?> TabBadge { get; set; }

TabBadgeColor

The badge's background color, or null for the system red.

Type: Color?

public Color? TabBadgeColor { get; set; }

TabReselectedCommand

Command invoked when this page's tab is tapped while already selected, replacing the default pop-to-root / scroll-to-top.

Type: ICommand?

public ICommand? TabReselectedCommand { get; set; }

TabReselectedCommandParameter

The parameter passed to TabReselectedCommand.

Type: object?

public object? TabReselectedCommandParameter { get; set; }

Title

The navigation bar title.

Type: Bindable<string?>

public Bindable<string?> Title { get; set; }

TitleColor

The navigation title's color, or null for the system default.

Type: Color?

public Color? TitleColor { get; set; }

TitleStyle

Whether the title is shown large and collapses as the content scrolls.

Type: TitleStyle

public TitleStyle TitleStyle { get; set; }

ToolbarItems

Buttons in the navigation bar.

Type: IList<ToolbarItem>

public IList<ToolbarItem> ToolbarItems { get; }

Methods

ArrangeOverride

Content arrangement. Panels override to place their children.

protected override Size ArrangeOverride(
  Size finalSize)
ParameterSummary
Size finalSizeThe final size available for the view's content.

Returns

  • Size: The arranged content size.

MeasureOverride

Content measurement. Panels recurse; controls delegate to the native SizeThatFits.

protected override Size MeasureOverride(
  Size availableSize)
ParameterSummary
Size availableSizeThe size available for the view's content.

Returns

  • Size: The desired content size.

OnAppeared

Raised after the page appears on screen.

protected virtual void OnAppeared()

OnAppearing

Raised before the page appears on screen.

protected virtual void OnAppearing()

OnDisappeared

Raised after the page leaves the screen.

protected virtual void OnDisappeared()

OnDisappearing

Raised before the page leaves the screen.

protected virtual void OnDisappearing()

OnLoaded

Raised once, the first time the page is realized.

protected virtual void OnLoaded()

OnUnloaded

Raised when the page's tree is torn down.

protected virtual void OnUnloaded()