7 types derived from Page
Microsoft.Maui.Controls (7)
FlyoutPage\FlyoutPage.cs (1)
14 public partial class FlyoutPage : Page, IFlyoutPageController, IElementConfiguration<FlyoutPage>, IFlyoutView
MultiPage.cs (1)
16 public abstract class MultiPage<[DynamicallyAccessedMembers(BindableProperty.DeclaringTypeMembers | BindableProperty.ReturnTypeMembers)] T> : Page, IViewContainer<T>, IPageContainer<T>, IItemsView<T>, IMultiPageController<T> where T : Page
NavigationPage\NavigationPage.cs (2)
15 public partial class NavigationPage : Page, IPageContainer<Page>, IBarElement, IElementConfiguration<NavigationPage>, IStackNavigationView, IToolbarElement
Shell\Shell.cs (2)
24 public partial class Shell : Page, IShellController, IPropertyPropagationController, IPageContainer<Page>, IFlyoutView
TemplatedPage.cs (1)
9 public class TemplatedPage : Page, IControlTemplated
1 instantiation of Page
Microsoft.Maui.Controls (1)
TabbedPage\TabbedPage.cs (1)
64 var page = new Page();
647 references to Page
Microsoft.Maui.Controls (523)
Application\Application.cs (6)
86 Page? _singleWindowMainPage; 89 public Page? MainPage 301 public event EventHandler<Page>? PageAppearing; 303 public event EventHandler<Page>? PageDisappearing; 389 internal void OnPageAppearing(Page page) 392 internal void OnPageDisappearing(Page page)
Element\Element.cs (1)
35 /// <term><see cref = "Page"/>
FlyoutPage\FlyoutPage.cs (6)
27 Page _detail; 31 Page _flyout; 38 public Page Detail 52 var previousDetail = _detail; 89 public Page Flyout 107 var previousFlyout = _flyout;
Hosting\AppHostBuilderExtensions.cs (1)
86 handlersCollection.AddHandler<Page, PageHandler>();
INavigation.cs (13)
10 IReadOnlyList<Page> ModalStack { get; } 12 IReadOnlyList<Page> NavigationStack { get; } 14 void InsertPageBefore(Page page, Page before); 15 Task<Page> PopAsync(); 16 Task<Page> PopAsync(bool animated); 17 Task<Page> PopModalAsync(); 18 Task<Page> PopModalAsync(bool animated); 22 Task PushAsync(Page page); 24 Task PushAsync(Page page, bool animated); 25 Task PushModalAsync(Page page); 26 Task PushModalAsync(Page page, bool animated); 28 void RemovePage(Page page);
INavigationPageController.cs (5)
11 Task<Page> RemoveAsyncInner(Page page, bool animated, bool fast); 13 Page Peek(int depth = 0); 15 IEnumerable<Page> Pages { get; } 19 Task<Page> PopAsyncInner(bool animated, bool fast = false);
Internals\NavigationRequestedEventArgs.cs (4)
12 public NavigationRequestedEventArgs(Page page, bool animated) : base(page) 18 public NavigationRequestedEventArgs(Page page, Page before, bool animated) : this(page, animated) 27 public Page BeforePage { get; set; }
Internals\PageExtensions.cs (3)
11 public static Page AncestorToRoot(this Page page) 17 return parent as Page;
IPageContainer.cs (1)
4 public interface IPageContainer<out T> where T : Page
ListView\ListView.cs (1)
675 if (view == null || view is Page)
Menu\MenuBarTracker.cs (1)
60 protected override IList<MenuBarItem> GetMenuItems(Page page) =>
Menu\MenuItemTracker.cs (27)
15 WeakReference<Page> _target; 16 List<WeakReference<Page>> _additionalTargets = new(); 21 protected abstract IList<TMenuItem> GetMenuItems(Page page); 25 public IEnumerable<Page> AdditionalTargets 31 if (target.TryGetTarget(out var page)) 40 foreach (var page in value) 55 public Page Target 57 get => _target is not null && _target.TryGetTarget(out var target) ? target : null; 60 var target = Target; 86 foreach (var item in AdditionalTargets) 101 List<TMenuItem> GetCurrentToolbarItems(Page page) 132 if (shell.GetCurrentShellPage() is Page shellPage && shellPage != shell) 135 else if (page is IPageContainer<Page>) 137 var container = (IPageContainer<Page>)page; 147 var page = eventArgs.Element as Page; 156 var page = eventArgs.Element as Page; 184 void RegisterChildPage(Page page) 199 void TrackTarget(Page page) 214 if (shell.GetCurrentShellPage() is Page currentShellPage) 220 page.Descendants<Page>().ForEach(RegisterChildPage); 230 if (((Shell)sender).GetCurrentShellPage() is Page page) 236 if (((Shell)sender).GetCurrentShellPage() is Page page) 245 void UnregisterChildPage(Page page) 255 void UntrackTarget(Page page) 271 page.Descendants().OfType<Page>().ForEach(UnregisterChildPage);
ModalEventArgs.cs (2)
9 protected ModalEventArgs(Page modal) 15 public Page Modal { get; private set; }
ModalPoppedEventArgs.cs (1)
8 public ModalPoppedEventArgs(Page modal) : base(modal)
ModalPoppingEventArgs.cs (1)
8 public ModalPoppingEventArgs(Page modal) : base(modal)
ModalPushedEventArgs.cs (1)
8 public ModalPushedEventArgs(Page modal) : base(modal)
ModalPushingEventArgs.cs (1)
8 public ModalPushingEventArgs(Page modal) : base(modal)
MultiPage.cs (3)
16 public abstract class MultiPage<[DynamicallyAccessedMembers(BindableProperty.DeclaringTypeMembers | BindableProperty.ReturnTypeMembers)] T> : Page, IViewContainer<T>, IPageContainer<T>, IItemsView<T>, IMultiPageController<T> where T : Page 27 internal static readonly BindableProperty IndexProperty = BindableProperty.Create("Index", typeof(int), typeof(Page), -1); 198 public static void SetIndex(Page page, int index)
NavigableElement\NavigableElement.cs (1)
9 /// <summary>Represents an <see cref="Element"/> with base functionality for <see cref="Page"/> navigation. Does not necessarily render on screen.</summary>
NavigationEventArgs.cs (2)
10 public NavigationEventArgs(Page page) 19 public Page Page { get; private set; }
NavigationModel.cs (33)
10 readonly List<Page> _modalStack = new List<Page>(); 11 readonly List<List<Page>> _navTree = new List<List<Page>>(); 14 public Page CurrentPage 24 public Page LastRoot 37 public IReadOnlyList<Page> Modals 43 public IEnumerable<Page> Roots 47 foreach (List<Page> list in _navTree) 55 public IReadOnlyList<IReadOnlyList<Page>> Tree 68 public void InsertPageBefore(Page page, Page before) 70 List<Page> currentStack = _navTree.Last(); 80 public Page Pop(Page ancestralNav) 83 foreach (List<Page> stack in _navTree) 89 Page result = stack.Last(); 99 public Page PopModal() 104 var previousPage = CurrentPage; 105 Page modal = _navTree.Last()[0]; 125 public Page PopTopPage() 127 Page itemToRemove; 148 public void PopToRoot(Page ancestralNav) 151 foreach (List<Page> stack in _navTree) 166 public void Push(Page page, Page ancestralNav) 172 _navTree.Add(new List<Page> { page }); 178 foreach (List<Page> stack in _navTree) 191 public void PushModal(Page page) 193 var previousPage = CurrentPage; 194 _navTree.Add(new List<Page> { page }); 211 public bool RemovePage(Page page) 214 List<Page> currentStack = _navTree.Last();
NavigationPage\NavigationPage.cs (52)
18 public static readonly BindableProperty BackButtonTitleProperty = BindableProperty.CreateAttached("BackButtonTitle", typeof(string), typeof(Page), null); 22 BindableProperty.CreateAttached("HasNavigationBar", typeof(bool), typeof(Page), true); 46 static readonly BindablePropertyKey CurrentPagePropertyKey = BindableProperty.CreateReadOnly(nameof(CurrentPage), typeof(Page), typeof(NavigationPage), null, propertyChanged: OnCurrentPageChanged); 51 static readonly BindablePropertyKey RootPagePropertyKey = BindableProperty.CreateReadOnly(nameof(RootPage), typeof(Page), typeof(NavigationPage), null); 72 public NavigationPage(Page root) : this(UseMauiHandler, root) 76 internal NavigationPage(bool setforMaui, Page root = null) 117 public Page Peek(int depth) 129 return (Page)InternalChildren[InternalChildren.Count - depth - 1]; 132 IEnumerable<Page> INavigationPageController.Pages => InternalChildren.Cast<Page>(); 140 public Page CurrentPage 142 get { return (Page)GetValue(CurrentPageProperty); } 147 public Page RootPage 149 get { return (Page)GetValue(RootPageProperty); } 158 if (bindable is Page page) 171 public static bool GetHasBackButton(Page page) 208 public Task<Page> PopAsync() 214 public async Task<Page> PopAsync(bool animated) 235 var result = await (this as INavigationPageController).PopAsyncInner(animated, false); 288 public Task PushAsync(Page page) 294 public async Task PushAsync(Page page, bool animated) 332 public static void SetHasBackButton(Page page, bool value) 377 void SendNavigated(Page previousPage, NavigationType navigationType) 383 void SendNavigating(Page navigatingFrom = null) 389 void FireDisappearing(Page page) 395 void FireAppearing(Page page) 467 CurrentPage = (Page)newStack[newStack.Count - 1]; 468 RootPage = (Page)newStack[0]; 513 if (oldValue is Page oldPage) 516 if (newValue is Page newPage && ((NavigationPage)bindable).HasAppeared) 587 var topLevelPage = parentPages[parentPages.Count - 1]; 607 else if (toolbarRoot is Page p) 694 var visiblePage = Navigation.NavigationStack[NavigationStack.Count - 1]; 723 readonly Lazy<ReadOnlyCastingList<Page, Element>> _castingList; 728 _castingList = new Lazy<ReadOnlyCastingList<Page, Element>>(() => new ReadOnlyCastingList<Page, Element>(Owner.InternalChildren)); 733 protected override IReadOnlyList<Page> GetNavigationStack() 738 protected override void OnInsertPageBefore(Page page, Page before) 776 protected async override Task<Page> OnPopAsync(bool animated) 783 var currentPage = NavigationStack[NavigationStack.Count - 1]; 784 var newCurrentPage = NavigationStack[NavigationStack.Count - 2]; 816 Page previousPage = Owner.CurrentPage; 817 Page newPage = Owner.RootPage; 818 List<Page> pagesToRemove = new List<Page>(); 826 var page = (Page)NavigationStack[lastIndex]; 846 protected override Task OnPushAsync(Page root, bool animated) 851 var previousPage = Owner.CurrentPage; 871 protected override void OnRemovePage(Page page) 895 Owner.RootPage = (Page)Owner.InternalChildren[0];
NavigationPage\NavigationPage.Legacy.cs (31)
17 async Task<Page> PopAsyncInner( 26 var page = (Page)InternalChildren.Last(); 27 var previousPage = CurrentPage; 29 var removedPage = await RemoveAsyncInner(page, animated, fast); 34 async Task<Page> RemoveAsyncInner( 35 Page page, 47 FireAppearing((Page)InternalChildren[NavigationPageController.StackDepth - 2]); 67 CurrentPage = (Page)InternalChildren.Last(); 75 Task<Page> INavigationPageController.PopAsyncInner(bool animated, bool fast) 80 Task<Page> INavigationPageController.RemoveAsyncInner(Page page, bool animated, bool fast) 120 void InsertPageBefore(Page page, Page before) 152 var previousPage = CurrentPage; 155 FireAppearing((Page)InternalChildren[0]); 176 PoppedToRoot?.Invoke(this, new PoppedToRootEventArgs(RootPage, childrenToRemove.OfType<Page>().ToList())); 180 async Task PushAsyncInner(Page page, bool animated) 185 var previousPage = CurrentPage; 221 void PushPage(Page page) 231 void RemovePage(Page page) 253 RootPage = (Page)InternalChildren.First(); 258 readonly Lazy<ReadOnlyCastingList<Page, Element>> _castingList; 263 _castingList = new Lazy<ReadOnlyCastingList<Page, Element>>(() => new ReadOnlyCastingList<Page, Element>(Owner.InternalChildren)); 268 protected override IReadOnlyList<Page> GetNavigationStack() 273 protected override void OnInsertPageBefore(Page page, Page before) 278 protected override Task<Page> OnPopAsync(bool animated) 288 protected override Task OnPushAsync(Page root, bool animated) 293 protected override void OnRemovePage(Page page)
NavigationPage\NavigationPageToolbar.cs (8)
12 Page _currentPage; 21 internal Page RootPage { get; private set; } 31 public NavigationPageToolbar(Maui.IElement parent, Page rootPage) : base(parent) 51 e.IsOneOf(Page.TitleProperty, 215 var currentPage = _currentPage; 217 Page previousPage = null; 287 Page target = _currentNavigationPage; 289 if (_currentNavigationPage.CurrentPage is Page currentPage)
NavigationProxy.cs (34)
27 Lazy<List<Page>> _pushStack = new Lazy<List<Page>>(() => new List<Page>()); 43 _pushStack = new Lazy<List<Page>>(() => new List<Page>()); 50 foreach (Page page in _pushStack.Value) 71 public void InsertPageBefore(Page page, Page before) 77 public IReadOnlyList<Page> ModalStack 83 public IReadOnlyList<Page> NavigationStack 89 public Task<Page> PopAsync() 95 public Task<Page> PopAsync(bool animated) 101 public Task<Page> PopModalAsync() 107 public Task<Page> PopModalAsync(bool animated) 125 public Task PushAsync(Page root) 131 public Task PushAsync(Page root, bool animated) 139 public Task PushModalAsync(Page modal) 145 public Task PushModalAsync(Page modal, bool animated) 153 public void RemovePage(Page page) 158 protected virtual IReadOnlyList<Page> GetModalStack() 164 protected virtual IReadOnlyList<Page> GetNavigationStack() 170 protected virtual void OnInsertPageBefore(Page page, Page before) 186 protected virtual Task<Page> OnPopAsync(bool animated) 192 protected virtual Task<Page> OnPopModal(bool animated) 204 return Task.FromResult<Page>(null); 206 Page root = _pushStack.Value.Last(); 214 protected virtual Task OnPushAsync(Page page, bool animated) 225 protected virtual Task OnPushModal(Page modal, bool animated) 236 protected virtual void OnRemovePage(Page page) 249 Page Pop() 251 List<Page> list = _pushStack.Value; 254 Page result = list[list.Count - 1]; 259 Page PopModal()
NavigationStepRequest.cs (8)
10 public NavigationStepRequest(Page page, bool isModal, bool isAnimated) 19 public Page Page { get; } 25 List<Page> _pages = new List<Page>(); 27 public IReadOnlyList<Page> Pages => _pages; 44 public void Remove(Page page) 88 var pages = new Page[array.Length]; 118 internal bool TryGetValue(Page page, [NotNullWhen(true)] out NavigationStepRequest? request)
Page\NavigatedFromEventArgs.cs (2)
22 internal Page DestinationPage { get; } 24 internal NavigatedFromEventArgs(Page destinationPage, NavigationType navigationType)
Page\NavigatedToEventArgs.cs (2)
8 internal NavigatedToEventArgs(Page previousPage) 13 internal Page PreviousPage { get; }
Page\Page.cs (27)
19 /// <remarks><see cref = "Page" /> is primarily a base class for more useful derived types. Objects that are derived from the <see cref="Page"/> class are most prominently used as the top level UI element in .NET MAUI applications. In addition to their role as the main pages of applications, <see cref="Page"/> objects and their descendants can be used with navigation classes, such as <see cref="NavigationPage"/> or <see cref="FlyoutPage"/>, among others, to provide rich user experiences that conform to the expected behaviors on each platform. 21 public partial class Page : VisualElement, ILayout, IPageController, IElementConfiguration<Page>, IPaddingElement, ISafeAreaView, ISafeAreaView2, IView, ITitledElement, IToolbarElement 50 internal static readonly BindableProperty IgnoresContainerAreaProperty = BindableProperty.Create(nameof(IgnoresContainerArea), typeof(bool), typeof(Page), false); 53 public static readonly BindableProperty BackgroundImageSourceProperty = BindableProperty.Create(nameof(BackgroundImageSource), typeof(ImageSource), typeof(Page), default(ImageSource)); 56 public static readonly BindableProperty IsBusyProperty = BindableProperty.Create(nameof(IsBusy), typeof(bool), typeof(Page), false, propertyChanged: (bo, o, n) => ((Page)bo).OnPageBusyChanged()); 62 public static readonly BindableProperty TitleProperty = BindableProperty.Create(nameof(Title), typeof(string), typeof(Page), null); 65 public static readonly BindableProperty IconImageSourceProperty = BindableProperty.Create(nameof(IconImageSource), typeof(ImageSource), typeof(Page), default(ImageSource)); 67 readonly Lazy<PlatformConfigurationRegistry<Page>> _platformConfigurationRegistry; 81 /// Initializes a new instance of the <see cref="Page"/> class. 98 _platformConfigurationRegistry = new Lazy<PlatformConfigurationRegistry<Page>>(() => new PlatformConfigurationRegistry<Page>(this)); 437 var page = child as Page; 545 /// <exception cref="InvalidOperationException">Thrown when the page's <see cref="Element.RealParent"/> can't be casted to <see cref="Page"/> or <see cref="BaseShellItem"/>.</exception> 548 if (!Application.IsApplicationOrWindowOrNull(RealParent) && !(RealParent is Page) && !(RealParent is BaseShellItem)) 610 var container = this as IPageContainer<Page>; 613 Page page = container.CurrentPage; 690 var pageContainer = this as IPageContainer<Page>; 713 var pageContainer = this as IPageContainer<Page>; 798 var container = this as IPageContainer<Page>; 820 public IPlatformElementConfiguration<T, Page> On<T>() where T : IConfigPlatform 866 (this as IPageContainer<Page>)?.CurrentPage?.SendNavigatedTo(args); 873 (this as IPageContainer<Page>)?.CurrentPage?.SendNavigatingFrom(args); 881 (this as IPageContainer<Page>)?.CurrentPage?.SendNavigatedFrom(args, false);
Platform\ModalNavigationManager\ModalNavigationManager.cs (17)
13 public IReadOnlyList<Page> ModalStack => _modalPages.Pages; 16 List<Page> _platformModalPages = new List<Page>(); 19 Page? _currentPage; 21 Page CurrentPlatformPage => 24 Page CurrentPlatformModalPage => 27 Page? CurrentPage 31 var currentPage = _modalPages.Count > 0 ? _modalPages[_modalPages.Count - 1].Page : _window.Page; 74 public Task<Page?> PopModalAsync() 79 public Task PushModalAsync(Page modal) 159 var page = await PopModalPlatformAsync(animated); 171 var nextPage = nextRequest.Page; 198 public async Task<Page?> PopModalAsync(bool animated) 205 Page modal = _modalPages[_modalPages.Count - 1].Page; 256 public async Task PushModalAsync(Page modal, bool animated) 262 var previousPage = CurrentPage; 324 var previousPage = _currentPage;
Platform\ModalNavigationManager\ModalNavigationManager.Standard.cs (3)
11 Task<Page> PopModalPlatformAsync(bool animated) 13 var currentPage = CurrentPlatformPage!; 18 Task PushModalPlatformAsync(Page modal, bool animated)
Platform\PageExtensions.cs (4)
9 internal static Page GetCurrentPage(this Page currentPage) 11 if (currentPage.NavigationProxy.ModalStack.LastOrDefault() is Page modal) 17 else if (currentPage is IPageContainer<Page> pc)
PlatformConfiguration\iOSSpecific\Page.cs (22)
6 using FormsElement = Maui.Controls.Page; 44 public static StatusBarHiddenMode PrefersStatusBarHidden(this IPlatformElementConfiguration<iOS, FormsElement> config) 55 public static IPlatformElementConfiguration<iOS, FormsElement> SetPrefersStatusBarHidden(this IPlatformElementConfiguration<iOS, FormsElement> config, StatusBarHiddenMode value) 97 public static UIStatusBarAnimation PreferredStatusBarUpdateAnimation(this IPlatformElementConfiguration<iOS, FormsElement> config) 108 public static IPlatformElementConfiguration<iOS, FormsElement> SetPreferredStatusBarUpdateAnimation(this IPlatformElementConfiguration<iOS, FormsElement> config, UIStatusBarAnimation value) 149 public static IPlatformElementConfiguration<iOS, FormsElement> SetUseSafeArea(this IPlatformElementConfiguration<iOS, FormsElement> config, bool value) 160 public static bool UsingSafeArea(this IPlatformElementConfiguration<iOS, FormsElement> config) 193 public static LargeTitleDisplayMode LargeTitleDisplay(this IPlatformElementConfiguration<iOS, FormsElement> config) 204 public static IPlatformElementConfiguration<iOS, FormsElement> SetLargeTitleDisplay(this IPlatformElementConfiguration<iOS, FormsElement> config, LargeTitleDisplayMode value) 237 public static Thickness SafeAreaInsets(this IPlatformElementConfiguration<iOS, FormsElement> config) 249 public static IPlatformElementConfiguration<iOS, FormsElement> SetSafeAreaInsets(this IPlatformElementConfiguration<iOS, FormsElement> config, Thickness value) 266 public static UIModalPresentationStyle ModalPresentationStyle(this IPlatformElementConfiguration<iOS, FormsElement> config) 277 public static IPlatformElementConfiguration<iOS, FormsElement> SetModalPresentationStyle(this IPlatformElementConfiguration<iOS, FormsElement> config, UIModalPresentationStyle value) 332 public static bool PrefersHomeIndicatorAutoHidden(this IPlatformElementConfiguration<iOS, FormsElement> config) 343 public static IPlatformElementConfiguration<iOS, FormsElement> SetPrefersHomeIndicatorAutoHidden(this IPlatformElementConfiguration<iOS, FormsElement> config, bool value)
PlatformConfiguration\macOSSpecific\Page.cs (4)
4 using FormsElement = Maui.Controls.Page; 26 public static VisualElement[] GetTabOrder(this IPlatformElementConfiguration<macOS, FormsElement> config) 32 public static IPlatformElementConfiguration<macOS, FormsElement> SetTabOrder(this IPlatformElementConfiguration<macOS, FormsElement> config, params VisualElement[] value)
PlatformConfiguration\TizenSpecific\Page.cs (5)
4 using FormsElement = Maui.Controls.Page; 12 = BindableProperty.CreateAttached("BreadCrumb", typeof(string), typeof(FormsElement), default(string)); 27 public static string GetBreadCrumb(this IPlatformElementConfiguration<Tizen, FormsElement> config) 33 public static IPlatformElementConfiguration<Tizen, FormsElement> SetBreadCrumb(this IPlatformElementConfiguration<Tizen, FormsElement> config, string value)
PlatformConfiguration\WindowsSpecific\Page.cs (9)
10 using FormsElement = Maui.Controls.Page; 24 typeof(FormsElement), ToolbarPlacement.Default); 51 public static ToolbarPlacement GetToolbarPlacement(this IPlatformElementConfiguration<Windows, FormsElement> config) 62 public static IPlatformElementConfiguration<Windows, FormsElement> SetToolbarPlacement( 63 this IPlatformElementConfiguration<Windows, FormsElement> config, ToolbarPlacement value) 78 typeof(FormsElement), true); 105 public static bool GetToolbarDynamicOverflowEnabled(this IPlatformElementConfiguration<Windows, FormsElement> config) 116 public static IPlatformElementConfiguration<Windows, FormsElement> SetToolbarDynamicOverflowEnabled( 117 this IPlatformElementConfiguration<Windows, FormsElement> config, bool value)
PoppedToRootEventArgs.cs (3)
11 public PoppedToRootEventArgs(Page page, IEnumerable<Page> poppedPages) : base(page) 20 public IEnumerable<Page> PoppedPages { get; private set; }
Properties\AssemblyInfo.cs (2)
86[assembly: StyleProperty("background-image", typeof(Page), nameof(Page.BackgroundImageSourceProperty))]
RadioButton\RadioButtonGroup.cs (1)
104 while (parent != null && !(parent is Page))
Routing.cs (5)
14 static Dictionary<string, Page> s_implicitPageRoutes = new(StringComparer.Ordinal); 28 internal static void RegisterImplicitPageRoute(Page page) 54 var page = section.Navigation.ModalStack[i]; 59 foreach (var npPages in np.Pages) 162 if (s_implicitPageRoutes.TryGetValue(route, out var page))
Shell\IShellContentController.cs (3)
8 Page GetOrCreateContent(); 10 void RecyclePage(Page page); 12 Page Page { get; }
Shell\IShellController.cs (1)
47 bool ProposeNavigation(ShellNavigationSource source, ShellItem item, ShellSection shellSection, ShellContent shellContent, IReadOnlyList<Page> stack, bool canCancel);
Shell\IShellSectionController.cs (4)
15 Page PresentedPage { get; } 19 void AddDisplayedPageObserver(object observer, Action<Page> callback); 36 void SendPopping(Page page); 40 void SendPopped(Page page);
Shell\Shell.cs (22)
29 public Page CurrentPage => GetVisiblePage() as Page; 75 ?? (bindable as Page)?.FindParentOfType<Shell>(); 209 /// Sets the navigation animation that plays when a <see cref="Page"/> is navigated to with the <see cref = "GoToAsync(ShellNavigationState, bool)" /> method. 904 bool IShellController.ProposeNavigation(ShellNavigationSource source, ShellItem shellItem, ShellSection shellSection, ShellContent shellContent, IReadOnlyList<Page> stack, bool canCancel) 1153 Page _previousPage; 1532 if (GetVisiblePage() is Page page && page.SendBackButtonPressed()) 1925 internal void SendPageAppearing(Page page) 1935 internal Page GetCurrentShellPage() 1938 Page currentPage = null; 2084 protected override IReadOnlyList<Page> GetNavigationStack() => SectionProxy?.NavigationStack; 2086 protected override void OnInsertPageBefore(Page page, Page before) => SectionProxy.InsertPageBefore(page, before); 2088 protected override Task<Page> OnPopAsync(bool animated) => SectionProxy.PopAsync(animated); 2092 protected override Task OnPushAsync(Page page, bool animated) => SectionProxy.PushAsync(page, animated); 2094 protected override void OnRemovePage(Page page) => SectionProxy.RemovePage(page); 2096 protected override async Task<Page> OnPopModal(bool animated) 2100 var page = _shell.CurrentPage; 2105 var modalPopped = await base.OnPopModal(animated); 2113 protected override async Task OnPushModal(Page modal, bool animated) 2148 protected override Task<Page> OnPopModal(bool animated) => _shellProxy.PopModalAsync(animated); 2150 protected override Task OnPushModal(Page modal, bool animated) => _shellProxy.PushModalAsync(modal, animated);
Shell\ShellContent.cs (19)
52 Page IShellContentController.Page => ContentCache; 58 Page IShellContentController.GetOrCreateContent() 63 Page result = null; 66 if (content is Page page) 91 result = ContentCache ?? (Page)template.CreateContent(content, this); 113 void IShellContentController.RecyclePage(Page page) 117 Page _contentCache; 130 ((ContentCache ?? Content) as Page)?.SendDisappearing(); 142 SendPageAppearing((ContentCache ?? Content) as Page); 145 void SendPageAppearing(Page page) 156 (sender as Page).ParentSet -= OnPresentedPageParentSet; 168 if (child is Page page) 178 if (child is Page page) 187 if (e.PropertyName == Page.IsVisibleProperty.PropertyName) 191 Page ContentCache 199 var oldCache = _contentCache; 306 if (oldValue is Page oldElement) 311 if (newValue is Page newElement) 317 throw new InvalidOperationException($"{nameof(ShellContent)} {nameof(Content)} should be of type {nameof(Page)}. Title {shellContent?.Title}, Route {shellContent?.Route} ");
Shell\ShellItem.cs (1)
105 var displayedPage = shell.GetCurrentShellPage();
Shell\ShellNavigationManager.cs (12)
346 IReadOnlyList<Page> stack, 484 IReadOnlyList<Page> sectionStack, 485 IReadOnlyList<Page> modalStack) 490 var topNavStackPage = 517 public static ShellNavigationState GetNavigationState(ShellItem shellItem, ShellSection shellSection, ShellContent shellContent, IReadOnlyList<Page> sectionStack, IReadOnlyList<Page> modalStack) 547 var page = sectionStack[i]; 556 var topPage = modalStack[i]; 575 public static List<Page> BuildFlattenedNavigationStack(Shell shell) 581 public static List<Page> BuildFlattenedNavigationStack(IReadOnlyList<Page> startingList, IReadOnlyList<Page> modalStack)
Shell\ShellNavigationParameters.cs (1)
19 public Page PagePushing { get; set; }
Shell\ShellSection.cs (62)
38 readonly List<(object Observer, Action<Page> Callback)> _displayedPageObservers = 39 new List<(object Observer, Action<Page> Callback)>(); 52 Page IShellSectionController.PresentedPage 79 void IShellSectionController.AddDisplayedPageObserver(object observer, Action<Page> callback) 117 var page = _navStack[_navStack.Count - 1]; 135 _navStack = new List<Page> { null }; 157 var last = _navStack[_navStack.Count - 1]; 168 void IShellSectionController.SendPopping(Page page) 179 void IShellSectionController.SendPopped(Page page) 211 Page _displayedPage; 212 List<Page> _navStack = new List<Page> { null }; 255 public IReadOnlyList<Page> Stack => _navStack; 257 internal Page DisplayedPage 321 List<Page> navStack = null; 330 var navStackCopy = new List<Page>(_navStack); 351 List<Page> pagesToInsert = new List<Page>(); 362 var page = GetOrCreateFromRoute(globalRoutes[i], queryData, services, i == globalRoutes.Count - 1, false); 393 Page navPage = navStack.Count > i + 1 ? navStack[i + 1] : null; 485 Page GetOrCreateFromRoute(string route, ShellRouteParameters queryData, IServiceProvider services, bool isLast, bool isPopping) 487 var content = Routing.GetOrCreateContent(route, services) as Page; 512 List<Page> modalPageStacks = new List<Page>(); 513 List<Page> nonModalPageStacks = new List<Page>(); 528 var content = GetOrCreateFromRoute(globalRoutes[i], queryData, services, isLast, false); 560 var modalPage = modalPageStacks[i]; 589 Task PushModalAsync(Page page, bool isAnimated) 597 async Task PushStackOfPages(List<Page> pages, bool? animate) 634 protected virtual IReadOnlyList<Page> GetNavigationStack() => _navStack; 639 var previousPage = DisplayedPage; 726 protected virtual void OnInsertPageBefore(Page page, Page before) 758 protected async virtual Task<Page> OnPopAsync(bool animated) 763 List<Page> stack = _navStack.ToList(); 777 var page = _navStack[_navStack.Count - 1]; 816 var page = _navStack[_navStack.Count - 1]; 824 _navStack = new List<Page> { null }; 841 protected virtual Task OnPushAsync(Page page, bool animated) 843 List<Page> stack = _navStack.ToList(); 873 internal async Task PopModalStackToPage(Page page, bool? animated) 881 var pageToPop = Navigation.ModalStack[Navigation.ModalStack.Count - 1]; 906 protected virtual void OnRemovePage(Page page) 960 var presentedPage = sectionController.PresentedPage; 970 (sender as Page).ParentSet -= OnPresentedPageParentSet; 1007 void AddPage(Page page) 1012 void RemovePage(Page page) 1047 protected override IReadOnlyList<Page> GetNavigationStack() => _owner.GetNavigationStack(); 1049 protected override async Task<Page> OnPopAsync(bool animated) 1062 var returnedPage = (_owner as IShellSectionController).PresentedPage; 1098 protected override Task OnPushAsync(Page page, bool animated) 1114 internal Task PushModalInnerAsync(Page modal, bool animated) 1121 internal Task<Page> PopModalInnerAsync(bool animated) 1126 protected override async Task OnPushModal(Page modal, bool animated) 1149 protected async override Task<Page> OnPopModal(bool animated) 1154 var page = ModalStack[ModalStack.Count - 1]; 1159 protected override void OnRemovePage(Page page) 1184 protected override void OnInsertPageBefore(Page page, Page before) 1213 ShellNavigationState GetUpdatedStatus(IReadOnlyList<Page> stack)
Shell\ShellUriHandler.cs (2)
38 var lastPage = pages[pages.Count - 1]; 46 foreach (var page in pages)
ShellToolbar.cs (7)
14 Page? _currentPage; 23 public Page? CurrentPage => _currentPage; 56 var currentPage = _shell.GetCurrentShellPage(); 81 Page? previousPage = null; 151 if (e.Is(Page.TitleProperty)) 174 Page? currentPage = _shell.GetCurrentShellPage(); 175 if (currentPage?.IsSet(Page.TitleProperty) == true)
TabbedPage\TabbedPage.cs (5)
9 public partial class TabbedPage : MultiPage<Page>, IBarElement, IElementConfiguration<TabbedPage>, ITabbedView 62 protected override Page CreateDefault(object item) 64 var page = new Page(); 116 foreach (var page in Children) 127 if (e.PropertyName == Page.TitleProperty.PropertyName)
Toolbar\ToolbarTracker.cs (1)
14 protected override IList<ToolbarItem> GetMenuItems(Page page) =>
ViewExtensions.cs (7)
378 internal static List<Page> GetParentPages(this Page target) 380 var result = new List<Page>(); 382 var parent = target.RealParent as Page; 386 parent = parent!.RealParent as Page; 513 var currentPage = modalStack[modalStack.Count - 1];
VisualElement\VisualElement.Mapper.cs (1)
27 viewMapper.ReplaceMapping<IView, IViewHandler>(nameof(Page.BackgroundImageSource), MapBackgroundImageSource);
Window\Window.cs (22)
23 nameof(Page), typeof(Page), typeof(Window), default(Page?), 25 propertyChanged: (b, o, n) => ((Window)b).OnPageChanged(o as Page, n as Page)); 98 public Window(Page page) 114 public Page? Page 116 get => (Page?)GetValue(PageProperty); 438 internal void OnModalPopped(Page modalPage) 453 internal bool OnModalPopping(Page modalPage) 461 internal void OnModalPushed(Page modalPage) 474 internal void OnModalPushing(Page modalPage) 604 if (oldValue is Page oldPage) 608 void OnPageChanged(Page? oldPage, Page? newPage) 699 protected override void OnInsertPageBefore(Page page, Page before) 704 protected override Task OnPushAsync(Page page, bool animated) 709 protected override Task<Page> OnPopAsync(bool animated) 719 protected override void OnRemovePage(Page page) 724 protected override IReadOnlyList<Page> GetModalStack() 729 protected override Task<Page?> OnPopModal(bool animated) 734 protected override Task OnPushModal(Page modal, bool animated)
Microsoft.Maui.Controls.Compatibility (124)
iOS\PageExtensions.cs (1)
11 public static UIViewController CreateViewController(this Page page)
iOS\Platform.cs (46)
45 readonly List<Page> _modals; 46 List<Page> _previousModals; 56 _modals = new List<Page>(); 66 internal Page Page { get; set; } 88 void INavigation.InsertPageBefore(Page page, Page before) 93 IReadOnlyList<Page> INavigation.ModalStack 98 return new List<Page>(); 104 IReadOnlyList<Page> INavigation.NavigationStack 106 get { return new List<Page>(); } 109 Task<Page> INavigation.PopAsync() 114 Task<Page> INavigation.PopAsync(bool animated) 119 Task<Page> INavigation.PopModalAsync() 124 async Task<Page> INavigation.PopModalAsync(bool animated) 126 var modal = _modals.Last(); 155 Task INavigation.PushAsync(Page root) 160 Task INavigation.PushAsync(Page root, bool animated) 165 Task INavigation.PushModalAsync(Page modal) 170 Task INavigation.PushModalAsync(Page modal, bool animated) 174 var elementConfiguration = modal as IElementConfiguration<Page>; 211 void INavigation.RemovePage(Page page) 359 internal void SetPage(Page newRoot) 420 bool PageIsChildOfPlatform(Page page) 422 var parent = page.AncestorToRoot(); 537 async Task PresentModal(Page modal, bool animated) 550 var topPage = _modals[_modals.Count - 2]; 663 MessagingCenter.Subscribe(this, Page.BusySetSignalName, (Page sender, bool enabled) => 673 MessagingCenter.Subscribe(this, Page.AlertSignalName, (Page sender, AlertArguments arguments) => 680 MessagingCenter.Subscribe(this, Page.PromptSignalName, (Page sender, PromptArguments arguments) => 687 MessagingCenter.Subscribe(this, Page.ActionSheetSignalName, (Page sender, ActionSheetArguments arguments) => 696 static bool IsModalPresentedFullScreen(Page modal) 698 var elementConfiguration = modal as IElementConfiguration<Page>; 705 MessagingCenter.Unsubscribe<Page, ActionSheetArguments>(this, Page.ActionSheetSignalName); 706 MessagingCenter.Unsubscribe<Page, AlertArguments>(this, Page.AlertSignalName); 707 MessagingCenter.Unsubscribe<Page, PromptArguments>(this, Page.PromptSignalName); 708 MessagingCenter.Unsubscribe<Page, bool>(this, Page.BusySetSignalName); 713 _previousModals = new List<Page>(_modals); 723 foreach (var modal in (_previousModals ?? _modals))
iOS\Renderers\CarouselPageRenderer.cs (6)
21 Dictionary<Page, UIView> _containerMap; 26 Page _previousPage; 67 _containerMap = new Dictionary<Page, UIView>(); 229 foreach (KeyValuePair<Page, UIView> kvp in _containerMap) 306 else if (e.PropertyName == Page.BackgroundImageSourceProperty.PropertyName) 363 this.ApplyNativeImageAsync(Page.BackgroundImageSourceProperty, bgImage =>
iOS\Renderers\NavigationRenderer.cs (30)
54 Page Current { get; set; } 113 public Task<bool> PopToRootAsync(Page page, bool animated = true) 126 public Task<bool> PopViewAsync(Page page, bool animated = true) 137 public Task<bool> PushPageAsync(Page page, bool animated = true) 310 protected virtual async Task<bool> OnPopToRoot(Page page, bool animated) 328 protected virtual async Task<bool> OnPopViewAsync(Page page, bool animated) 355 protected virtual async Task<bool> OnPushAsync(Page page, bool animated) 381 ParentingViewController CreateViewControllerForPage(Page page) 410 var page = Element as Page; 414 if (flyoutDetail != null && parentPages.Append((Page)Element).Contains(flyoutDetail.Detail)) 418 Task<bool> GetAppearedOrDisappearedTask(Page page) 494 void ValidateNavbarExists(Page newCurrentPage) 551 PageUIStatusBarAnimation animation = PlatformConfiguration.iOSSpecific.Page.PreferredStatusBarUpdateAnimation(((Page)Element).OnThisPlatform()); 568 void InsertPageBefore(Page page, Page before) 610 void RemovePage(Page page) 810 internal async Task UpdateFormsInnerNavigation(Page pageBeingRemoved) 832 await FlyoutPage.Flyout.ApplyNativeImageAsync(Page.IconImageSourceProperty, icon => 998 Page _child; 1011 public Page Child 1162 else if (e.PropertyName == Page.TitleProperty.PropertyName) 1242 internal void UpdateLeftBarButtonItem(Page pageBeingRemoved = null) 1248 var currentChild = this.Child; 1249 var firstPage = n.NavPageController.Pages.FirstOrDefault(); 1265 public bool NeedsTitleViewContainer(Page page) => NavigationPage.GetTitleIconImageSource(page) != null || NavigationPage.GetTitleView(page) != null; 1267 internal void UpdateBackButtonTitle(Page page) => UpdateBackButtonTitle(page.Title, NavigationPage.GetBackButtonTitle(page)); 1281 internal void UpdateTitleArea(Page page) 1384 var current = Child; 1435 var page = Child;
iOS\Renderers\PageRenderer.cs (8)
28 Page Page => Element as Page; 282 else if (e.PropertyName == Page.BackgroundImageSourceProperty.PropertyName) 284 else if (e.PropertyName == Page.TitleProperty.PropertyName) 297 else if (e.PropertyName == Page.PaddingProperty.PropertyName) 393 Page.SetValueFromRenderer(Page.PaddingProperty, _userPadding); 422 Page.SetValueFromRenderer(Page.PaddingProperty, SafeAreaInsets); 470 _ = this.ApplyNativeImageAsync(Page.BackgroundImageSourceProperty, bgImage =>
iOS\Renderers\PhoneFlyoutPageRenderer.cs (6)
33 Page Page => Element as Page; 239 if (e.PropertyName == Page.IconImageSourceProperty.PropertyName || e.PropertyName == Page.TitleProperty.PropertyName) 253 else if (e.PropertyName == Page.BackgroundImageSourceProperty.PropertyName) 338 _ = this.ApplyNativeImageAsync(Page.BackgroundImageSourceProperty, bgImage =>
iOS\Renderers\TabbedRenderer.cs (21)
31 Page Page => Element as Page; 178 UIViewController GetViewController(Page page) 197 if (e.PropertyName == Page.IconImageSourceProperty.PropertyName || e.PropertyName == Page.TitleProperty.PropertyName) 199 var page = (Page)sender; 212 e.Apply((o, i, c) => SetupPage((Page)o, i), (o, i) => TeardownPage((Page)o, i), Reset); 231 var current = Tabbed.CurrentPage; 262 var current = Tabbed.CurrentPage; 271 PageUIStatusBarAnimation animation = ((Page)Element).OnThisPlatform().PreferredStatusBarUpdateAnimation(); 287 var current = Tabbed.CurrentPage; 307 foreach (var page in Tabbed.Children) 327 void SetupPage(Page page, int index) 341 void TeardownPage(Page page, int index) 448 var page = (Page)Tabbed.InternalChildren[originalIndex]; 468 var page = renderer.Element as Page; 509 protected virtual async Task<Tuple<UIImage, UIImage>> GetIcon(Page page)
iOS\Renderers\TabletFlyoutPageRenderer.cs (5)
135 Page PageController => Element as Page; 436 if (e.PropertyName == Page.IconImageSourceProperty.PropertyName || e.PropertyName == Page.TitleProperty.PropertyName) 503 _ = this.ApplyNativeImageAsync(Page.BackgroundImageSourceProperty, bgImage =>
iOS\VisualElementTracker.cs (1)
251 bool shouldUpdate = (!(visualElement is Page) || visualElement is ContentPage) && width > 0 && height > 0 && parent != null && boundsChanged;