NavigationPage 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
Page,用於管理一疊其他頁面的巡覽和使用者體驗。
public ref class NavigationPage : Microsoft::Maui::Controls::Page, Microsoft::Maui::Controls::IElementConfiguration<Microsoft::Maui::Controls::NavigationPage ^>, Microsoft::Maui::Controls::INavigationPageController, Microsoft::Maui::Controls::IPageContainer<Microsoft::Maui::Controls::Page ^>, Microsoft::Maui::IStackNavigationView, Microsoft::Maui::IToolbarElement
public class NavigationPage : Microsoft.Maui.Controls.Page, Microsoft.Maui.Controls.IElementConfiguration<Microsoft.Maui.Controls.NavigationPage>, Microsoft.Maui.Controls.INavigationPageController, Microsoft.Maui.Controls.IPageContainer<Microsoft.Maui.Controls.Page>, Microsoft.Maui.IStackNavigationView, Microsoft.Maui.IToolbarElement
type NavigationPage = class
inherit Page
interface IStackNavigationView
interface IView
interface IElement
interface ITransform
interface IStackNavigation
interface IToolbarElement
interface INavigationPageController
interface IPageContainer<Page>
interface IElementConfiguration<NavigationPage>
type NavigationPage = class
inherit Page
interface IPageContainer<Page>
interface IElementConfiguration<NavigationPage>
interface IStackNavigationView
interface IView
interface IElement
interface ITransform
interface IStackNavigation
interface IToolbarElement
interface INavigationPageController
Public Class NavigationPage
Inherits Page
Implements IElementConfiguration(Of NavigationPage), INavigationPageController, IPageContainer(Of Page), IStackNavigationView, IToolbarElement
- 繼承
- 實作
備註
請注意,在Android平臺上, INavigation 作業不會產生活動生命週期通知。 針對您推送或快顯的每個 Page 專案,的 NavigationPage Android 實作只會在單一活動中新增或移除頁面的內容。
另請注意,Windows Phone 平臺會以原生方式提供流覽。 因此,您不需要使用 NavigationPage 物件來取得該平臺上的導覽。
建構函式
NavigationPage() |
初始化新的 NavigationPage 物件。 |
NavigationPage(Page) |
建立新的 NavigationPage 項目,並以 |
欄位
ActionSheetSignalName |
內部傳訊系統用來顯示動作表單的標識碼。 (繼承來源 Page) |
AlertSignalName |
內部傳訊系統用來顯示警示對話框的標識碼。 (繼承來源 Page) |
BackButtonTitleProperty |
附加屬性的 Bindable 屬性 |
BarBackgroundColorProperty |
的 BarBackgroundColorBindable 屬性。 |
BarBackgroundProperty |
的 BarBackgroundBindable 屬性。 |
BarTextColorProperty |
的 BarTextColorBindable 屬性。 |
BusySetSignalName |
內部傳訊系統用來設定 IsBusy的標識碼。 (繼承來源 Page) |
ControlsNavigationPageMapper |
已淘汰.
Page,用於管理一疊其他頁面的巡覽和使用者體驗。 |
CurrentPageProperty |
的 CurrentPageBindable 屬性。 |
HasBackButtonProperty |
附加屬性的 Bindable 屬性 |
HasNavigationBarProperty |
附加屬性的 Bindable 屬性 |
IconColorProperty |
附加屬性的 Bindable 屬性 |
PromptSignalName |
內部傳訊系統用來顯示提示對話框的標識碼。 (繼承來源 Page) |
RootPageProperty |
的 RootPage可系結屬性。 |
TitleIconImageSourceProperty |
附加屬性 的可系結屬性 |
TitleViewProperty |
附加屬性 的可系結屬性 |
屬性
AnchorX |
取得或設定相對於專案界限的任何轉換作業中心點的 X 元件。 這是可繫結屬性。 (繼承來源 VisualElement) |
AnchorY |
取得或設定相對於專案界限的任何轉換作業中心點的 Y 元件。 這是可繫結屬性。 (繼承來源 VisualElement) |
AutomationId |
取得或設定值,允許自動化架構尋找此項目並與之互動。 (繼承來源 Element) |
Background |
取得或設定 Brush 將用來填滿專案背景的 。 這是可繫結屬性。 (繼承來源 VisualElement) |
BackgroundColor |
取得或設定將 Color 填滿專案背景的 。 這是可繫結屬性。 (繼承來源 VisualElement) |
BackgroundImageSource |
取得或設定 ImageSource 將做這個頁面背景的 。 這是可繫結屬性。 (繼承來源 Page) |
BarBackground |
Page,用於管理一疊其他頁面的巡覽和使用者體驗。 |
BarBackgroundColor |
取得或設定 NavigationPage 頂端列的背景色彩。 |
BarTextColor |
取得或設定顯示在 NavigationPage 頂端列的文字。 |
Batched |
取得值,這個值表示這個專案有批次變更。 (繼承來源 VisualElement) |
Behaviors |
取得與這個專案相關聯的物件清單 Behavior 。 這是唯讀的可繫結屬性。 (繼承來源 VisualElement) |
BindingContext |
取得或設定 對象,這個物件包含屬於這個 BindableObject之系結屬性的目標屬性。 這是可繫結屬性。 (繼承來源 BindableObject) |
Bounds |
取得裝置獨立單位中元素的界限。 (繼承來源 VisualElement) |
class |
Page,用於管理一疊其他頁面的巡覽和使用者體驗。 (繼承來源 NavigableElement) |
ClassId |
取得或設定值,用來識別語意類似項目的集合。 (繼承來源 Element) |
Clip |
指定專案的裁剪區域。 這是可繫結屬性。 (繼承來源 VisualElement) |
ContainerArea |
取得或設定此頁面包含的區域。 (繼承來源 Page) |
CurrentPage |
目前在巡覽堆疊最上方的 Page。 |
DesiredSize |
取得這個項目在版面配置處理序的測量傳遞期間所計算的大小。 (繼承來源 VisualElement) |
DisableLayout |
取得值,這個值表示已停用這個專案的配置。 (繼承來源 VisualElement) |
Dispatcher |
取得建立這個可系結物件時可用的發送器,否則會嘗試尋找最接近的可用發送器, (可能是視窗/應用程式的) 。 (繼承來源 BindableObject) |
EffectControlProvider |
供 .NET MAUI 內部使用。 (繼承來源 Element) |
Effects |
取得或設定將在運行時間套用至項目的樣式和屬性。 (繼承來源 Element) |
FlowDirection |
取得或設定配置流程方向。 這是可繫結屬性。 (繼承來源 VisualElement) |
Frame |
取得或設定這個項目位於畫面上的框架。 (繼承來源 VisualElement) |
Handler |
取得或設定 IViewHandler 與這個項目相關聯的 。 (繼承來源 VisualElement) |
Height |
取得此項目的目前呈現高度。 這是唯讀的可繫結屬性。 (繼承來源 VisualElement) |
HeightRequest |
取得或設定此項目所需的高度覆寫項。 這是可繫結屬性。 (繼承來源 VisualElement) |
IconImageSource |
取得或設定 ImageSource 要用於與此頁面相關聯之圖示的 。 這是可繫結屬性。 (繼承來源 Page) |
Id |
取得值,這個值可用來在應用程式執行期間唯一識別專案。 (繼承來源 Element) |
IgnoresContainerArea |
取得或設定值,判斷是否要忽略 ContainerArea。 這是可繫結屬性。 (繼承來源 Page) |
InputTransparent |
取得或設定值,指出這個專案是否會在用戶互動期間響應點擊測試。 這是可繫結屬性。 (繼承來源 VisualElement) |
InternalChildren |
取得此頁面中包含的子項目內部集合。 (繼承來源 Page) |
IsBusy |
取得或設定頁面忙碌狀態。 這會導致平台特定全域活動指示器顯示忙碌狀態。 這是可繫結屬性。 (繼承來源 Page) |
IsEnabled |
取得或設定值,這個值指出使用者介面中是否已啟用此項目。 這是可繫結屬性。 (繼承來源 VisualElement) |
IsEnabledCore |
這個值代表累計 IsEnabled 值。 如果值將會變更,則覆寫這個屬性的所有類型也需要叫用 RefreshIsEnabledProperty () 方法。 (繼承來源 VisualElement) |
IsFocused |
取得值,這個值指出此項目目前是否為焦點。 這是可繫結屬性。 (繼承來源 VisualElement) |
IsInPlatformLayout |
取得或設定值,這個值表示這個專案目前正在執行平臺配置週期。 (繼承來源 VisualElement) |
IsLoaded |
指出專案是否連接到主物件樹狀結構。 (繼承來源 VisualElement) |
IsPlatformEnabled |
取得或設定值,這個值表示是否啟用這個項目的平臺對等專案。 (繼承來源 VisualElement) |
IsPlatformStateConsistent |
取得或設定值,這個值表示這個專案目前與平臺對等項目狀態一致。 (繼承來源 VisualElement) |
IsVisible |
取得或設定值,這個值會決定此元素是否會在畫面上顯示,並佔用版面配置的空間。 這是可繫結屬性。 (繼承來源 VisualElement) |
LogicalChildren |
已淘汰.
供 Microsoft.Maui.Controls 平台內部使用。 (繼承來源 Element) |
MaximumHeightRequest |
取得或設定專案在版面配置期間要求的最大高度。 這是可繫結屬性。 (繼承來源 VisualElement) |
MaximumWidthRequest |
取得或設定專案在版面配置期間要求的最大寬度。 這是可繫結屬性。 (繼承來源 VisualElement) |
MenuBarItems |
MenuBarItem取得此頁面的物件,以平臺特定方式實作。 (繼承來源 Page) |
MinimumHeightRequest |
取得或設定元素在版面配置期間要求的最低高度。 這是可繫結屬性。 (繼承來源 VisualElement) |
MinimumWidthRequest |
取得或設定元素在版面配置期間要求的最低寬度。 這是可繫結屬性。 (繼承來源 VisualElement) |
Navigation |
Page,用於管理一疊其他頁面的巡覽和使用者體驗。 (繼承來源 NavigableElement) |
NavigationProxy |
Page,用於管理一疊其他頁面的巡覽和使用者體驗。 (繼承來源 NavigableElement) |
Opacity |
取得或設定套用至項目 (呈現時) 的不透明度值。 此值的範圍是 0 到 1;超出此範圍的值會設定為最接近的有效值。 這是可繫結屬性。 (繼承來源 VisualElement) |
Padding |
取得或設定頁面內容與其框線之間的空間。 這是可繫結屬性。 (繼承來源 Page) |
Parent |
取得或設定這個專案的父 Element 代。 (繼承來源 Element) |
RealParent |
供 .NET MAUI 內部使用。 (繼承來源 Element) |
Resources |
取得或設定本機資源字典。 (繼承來源 VisualElement) |
RootPage |
巡覽堆疊的根 Page。 |
Rotation |
取得或設定呈現元素時繞著 Z 軸 (仿射旋轉) 的旋轉 (度)。 這是可繫結屬性。 (繼承來源 VisualElement) |
RotationX |
取得或設定呈現元素時繞著 X 軸 (透視旋轉) 的旋轉 (度)。 這是可繫結屬性。 (繼承來源 VisualElement) |
RotationY |
取得或設定呈現元素時繞著 Y 軸 (透視旋轉) 的旋轉 (度)。 這是可繫結屬性。 (繼承來源 VisualElement) |
Scale |
取得或設定套用至項目的縮放比例。 這是可繫結屬性。 (繼承來源 VisualElement) |
ScaleX |
取得或設定要套用至 X 方向的小數位數值。 這是可繫結屬性。 (繼承來源 VisualElement) |
ScaleY |
取得或設定要套用至 Y 方向的小數位數值。 這是可繫結屬性。 (繼承來源 VisualElement) |
Shadow |
取得或設定 元素所轉換的陰影效果。 這是可繫結屬性。 (繼承來源 VisualElement) |
Style |
Page,用於管理一疊其他頁面的巡覽和使用者體驗。 (繼承來源 NavigableElement) |
StyleClass |
Page,用於管理一疊其他頁面的巡覽和使用者體驗。 (繼承來源 NavigableElement) |
StyleId |
取得或設定使用者定義值來唯一識別項目。 (繼承來源 Element) |
Title |
取得或設定頁面的標題。 (繼承來源 Page) |
ToolbarItems |
ToolbarItem取得此頁面的物件,以平臺特定方式實作。 (繼承來源 Page) |
TranslationX |
取得或設定項目的 X 轉譯差異。 這是可繫結屬性。 (繼承來源 VisualElement) |
TranslationY |
取得或設定項目的 Y 轉譯差異。 這是可繫結屬性。 (繼承來源 VisualElement) |
Triggers |
取得與這個專案相關聯的物件清單 TriggerBase 。 這是唯讀的可繫結屬性。 (繼承來源 VisualElement) |
Visual |
取得或設定實 IVisual 作,這個實作會覆寫專案的視覺外觀。 這是可繫結屬性。 (繼承來源 VisualElement) |
Width |
取得這個專案目前的寬度。 這是唯讀的可繫結屬性。 (繼承來源 VisualElement) |
WidthRequest |
取得或設定此項目所需的寬度覆寫項。 這是可繫結屬性。 (繼承來源 VisualElement) |
Window |
Window取得與項目相關聯的 。 這是唯讀的可繫結屬性。 (繼承來源 VisualElement) |
X |
取得此項目的目前 X 位置。 這是唯讀的可繫結屬性。 (繼承來源 VisualElement) |
Y |
取得此項目的目前 Y 位置。 這是唯讀的可繫結屬性。 (繼承來源 VisualElement) |
ZIndex |
取得或設定版面配置中專案的前至后 z 索引。 這是可繫結屬性。 (繼承來源 VisualElement) |
方法
事件
Appearing |
在畫面上以可視化方式顯示此頁面時引發。 (繼承來源 Page) |
BatchCommitted |
呼叫 來認可 BatchCommit()屬性變更批次時發生。 (繼承來源 VisualElement) |
BindingContextChanged |
發生於 BindingContext 屬性的值變更時。 (繼承來源 BindableObject) |
ChildAdded |
每當子專案加入至 項目時引發。 (繼承來源 Element) |
ChildRemoved |
每當從專案中移除子項目時引發。 (繼承來源 Element) |
ChildrenReordered |
發生於這個專案的子系順序變更時。 (繼承來源 VisualElement) |
DescendantAdded |
每當子專案加入至專案的子樹時引發。 (繼承來源 Element) |
DescendantRemoved |
每當從專案子樹中移除子項目時引發。 (繼承來源 Element) |
Disappearing |
當此頁面從畫面視覺上消失時引發。 (繼承來源 Page) |
FocusChangeRequested |
已淘汰.
Page,用於管理一疊其他頁面的巡覽和使用者體驗。 (繼承來源 VisualElement) |
Focused |
發生於這個元素聚焦時。 (繼承來源 VisualElement) |
HandlerChanged |
每當項目的處理程式變更時引發。 (繼承來源 Element) |
HandlerChanging |
每當項目的處理程序開始變更時引發。 (繼承來源 Element) |
LayoutChanged |
當此頁面的子系因此可能變更版面配置時引發。 (繼承來源 Page) |
Loaded |
發生於專案已建構並加入至物件樹狀結構時。 (繼承來源 VisualElement) |
MeasureInvalidated |
發生於專案的目前量值已失效時。 (繼承來源 VisualElement) |
NavigatedFrom |
在頁面巡覽離開之後引發。 (繼承來源 Page) |
NavigatedTo |
在頁面巡覽至 之後引發。 (繼承來源 Page) |
NavigatingFrom |
在離開頁面之前引發。 (繼承來源 Page) |
ParentChanged |
每當專案的父代變更時引發。 (繼承來源 Element) |
ParentChanging |
每當項目的 開始變更時引發。 (繼承來源 Element) |
Popped |
Page,用於管理一疊其他頁面的巡覽和使用者體驗。 |
PoppedToRoot |
Page,用於管理一疊其他頁面的巡覽和使用者體驗。 |
PropertyChanged |
當屬性值變更時發生。 (繼承來源 BindableObject) |
PropertyChanging |
當屬性值變更中時發生。 (繼承來源 BindableObject) |
Pushed |
Page,用於管理一疊其他頁面的巡覽和使用者體驗。 |
SizeChanged |
發生於專案的大小變更時。 (繼承來源 VisualElement) |
Unfocused |
發生於這個專案未對焦時。 (繼承來源 VisualElement) |
Unloaded |
當專案不再連接到主要物件樹狀結構時發生。 (繼承來源 VisualElement) |
明確介面實作
擴充方法
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應