7 types derived from Page
Microsoft.Maui.Controls (7)
FlyoutPage\FlyoutPage.cs (1)
17
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)
26
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
();
529 references to Page
Microsoft.Maui.Controls (529)
Application\Application.cs (6)
87
Page
? _singleWindowMainPage;
90
public
Page
? MainPage
303
public event EventHandler<
Page
>? PageAppearing;
305
public event EventHandler<
Page
>? PageDisappearing;
391
internal void OnPageAppearing(
Page
page)
394
internal void OnPageDisappearing(
Page
page)
Element\Element.cs (1)
35
/// <term><see cref = "
Page
"/>
FlyoutPage\FlyoutPage.cs (6)
30
Page
_detail;
34
Page
_flyout;
41
public
Page
Detail
55
var
previousDetail = _detail;
92
public
Page
Flyout
110
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)
464
CurrentPage = (
Page
)newStack[newStack.Count - 1];
465
RootPage = (
Page
)newStack[0];
510
if (oldValue is
Page
oldPage)
513
if (newValue is
Page
newPage && ((NavigationPage)bindable).HasAppeared)
584
var
topLevelPage = parentPages[parentPages.Count - 1];
604
else if (toolbarRoot is
Page
p)
691
var
visiblePage = Navigation.NavigationStack[NavigationStack.Count - 1];
720
readonly Lazy<ReadOnlyCastingList<
Page
, Element>> _castingList;
725
_castingList = new Lazy<ReadOnlyCastingList<
Page
, Element>>(() => new ReadOnlyCastingList<
Page
, Element>(Owner.InternalChildren));
730
protected override IReadOnlyList<
Page
> GetNavigationStack()
735
protected override void OnInsertPageBefore(
Page
page,
Page
before)
773
protected async override Task<
Page
> OnPopAsync(bool animated)
780
var
currentPage = NavigationStack[NavigationStack.Count - 1];
781
var
newCurrentPage = NavigationStack[NavigationStack.Count - 2];
813
Page
previousPage = Owner.CurrentPage;
814
Page
newPage = Owner.RootPage;
815
List<
Page
> pagesToRemove = new List<
Page
>();
823
var
page = (
Page
)NavigationStack[lastIndex];
843
protected override Task OnPushAsync(
Page
root, bool animated)
848
var
previousPage = Owner.CurrentPage;
868
protected override void OnRemovePage(
Page
page)
892
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 (10)
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,
74
Page
previous = null;
75
foreach (
var
page in pages)
227
var
currentPage = _currentPage;
229
Page
previousPage = null;
299
Page
target = _currentNavigationPage;
301
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 (29)
21
/// <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.
24
public partial class Page : VisualElement, ILayout, IPageController, IElementConfiguration<
Page
>, IPaddingElement, ISafeAreaView, ISafeAreaView2, IView, ITitledElement, IToolbarElement
53
internal static readonly BindableProperty IgnoresContainerAreaProperty = BindableProperty.Create(nameof(IgnoresContainerArea), typeof(bool), typeof(
Page
), false);
56
public static readonly BindableProperty BackgroundImageSourceProperty = BindableProperty.Create(nameof(BackgroundImageSource), typeof(ImageSource), typeof(
Page
), default(ImageSource));
59
public static readonly BindableProperty IsBusyProperty = BindableProperty.Create(nameof(IsBusy), typeof(bool), typeof(
Page
), false, propertyChanged: (bo, o, n) => ((
Page
)bo).OnPageBusyChanged());
65
public static readonly BindableProperty TitleProperty = BindableProperty.Create(nameof(Title), typeof(string), typeof(
Page
), null);
68
public static readonly BindableProperty IconImageSourceProperty = BindableProperty.Create(nameof(IconImageSource), typeof(ImageSource), typeof(
Page
), default(ImageSource), propertyChanged: OnImageSourceChanged);
70
readonly Lazy<PlatformConfigurationRegistry<
Page
>> _platformConfigurationRegistry;
84
/// Initializes a new instance of the <see cref="
Page
"/> class.
101
_platformConfigurationRegistry = new Lazy<PlatformConfigurationRegistry<
Page
>>(() => new PlatformConfigurationRegistry<
Page
>(this));
442
var
page = child as
Page
;
550
/// <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>
553
if (!Application.IsApplicationOrWindowOrNull(RealParent) && !(RealParent is
Page
) && !(RealParent is BaseShellItem))
615
var container = this as IPageContainer<
Page
>;
618
Page
page = container.CurrentPage;
695
var pageContainer = this as IPageContainer<
Page
>;
718
var pageContainer = this as IPageContainer<
Page
>;
803
var container = this as IPageContainer<
Page
>;
825
public IPlatformElementConfiguration<T,
Page
> On<T>() where T : IConfigPlatform
871
(this as IPageContainer<
Page
>)?.CurrentPage?.SendNavigatedTo(args);
878
(this as IPageContainer<
Page
>)?.CurrentPage?.SendNavigatingFrom(args);
886
(this as IPageContainer<
Page
>)?.CurrentPage?.SendNavigatedFrom(args, false);
910
oldImageSource.SourceChanged -= ((
Page
)bindable).OnImageSourceSourceChanged;
913
newImageSource.SourceChanged += ((
Page
)bindable).OnImageSourceSourceChanged;
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 (23)
31
public
Page
CurrentPage => GetVisiblePage() as
Page
;
77
?? (bindable as
Page
)?.FindParentOfType<Shell>();
211
/// Sets the navigation animation that plays when a <see cref="
Page
"/> is navigated to with the <see cref = "GoToAsync(ShellNavigationState, bool)" /> method.
906
bool IShellController.ProposeNavigation(ShellNavigationSource source, ShellItem shellItem, ShellSection shellSection, ShellContent shellContent, IReadOnlyList<
Page
> stack, bool canCancel)
1155
Page
_previousPage;
1534
if (GetVisiblePage() is
Page
page && page.SendBackButtonPressed())
1927
internal void SendPageAppearing(
Page
page)
1937
internal
Page
GetCurrentShellPage()
1940
Page
currentPage = null;
2086
protected override IReadOnlyList<
Page
> GetNavigationStack() => SectionProxy?.NavigationStack;
2088
protected override void OnInsertPageBefore(
Page
page,
Page
before) => SectionProxy.InsertPageBefore(page, before);
2090
protected override Task<
Page
> OnPopAsync(bool animated) => SectionProxy.PopAsync(animated);
2094
protected override Task OnPushAsync(
Page
page, bool animated) => SectionProxy.PushAsync(page, animated);
2096
protected override void OnRemovePage(
Page
page) => SectionProxy.RemovePage(page);
2098
protected override async Task<
Page
> OnPopModal(bool animated)
2102
var
page = _shell.CurrentPage;
2107
var
modalPopped = await base.OnPopModal(animated);
2115
protected override async Task OnPushModal(
Page
modal, bool animated)
2150
protected override Task<
Page
> OnPopModal(bool animated) => _shellProxy.PopModalAsync(animated);
2152
protected override Task OnPushModal(
Page
modal, bool animated) => _shellProxy.PushModalAsync(modal, animated);
2163
public
Page
CurrentPage => shell.CurrentPage;
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)
107
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 (63)
40
readonly List<(object Observer, Action<
Page
> Callback)> _displayedPageObservers =
41
new List<(object Observer, Action<
Page
> Callback)>();
54
Page
IShellSectionController.PresentedPage
81
void IShellSectionController.AddDisplayedPageObserver(object observer, Action<
Page
> callback)
119
var
page = _navStack[_navStack.Count - 1];
137
_navStack = new List<
Page
> { null };
159
var
last = _navStack[_navStack.Count - 1];
170
void IShellSectionController.SendPopping(
Page
page)
181
void IShellSectionController.SendPopped(
Page
page)
213
Page
_displayedPage;
214
List<
Page
> _navStack = new List<
Page
> { null };
257
public IReadOnlyList<
Page
> Stack => _navStack;
259
internal
Page
DisplayedPage
323
List<
Page
> navStack = null;
332
var navStackCopy = new List<
Page
>(_navStack);
353
List<
Page
> pagesToInsert = new List<
Page
>();
364
var
page = GetOrCreateFromRoute(globalRoutes[i], queryData, services, i == globalRoutes.Count - 1, false);
395
Page
navPage = navStack.Count > i + 1 ? navStack[i + 1] : null;
498
Page
GetOrCreateFromRoute(string route, ShellRouteParameters queryData, IServiceProvider services, bool isLast, bool isPopping)
500
var
content = Routing.GetOrCreateContent(route, services) as
Page
;
525
List<
Page
> modalPageStacks = new List<
Page
>();
526
List<
Page
> nonModalPageStacks = new List<
Page
>();
541
var
content = GetOrCreateFromRoute(globalRoutes[i], queryData, services, isLast, false);
573
var
modalPage = modalPageStacks[i];
602
Task PushModalAsync(
Page
page, bool isAnimated)
610
async Task PushStackOfPages(List<
Page
> pages, bool? animate)
647
protected virtual IReadOnlyList<
Page
> GetNavigationStack() => _navStack;
652
var
previousPage = DisplayedPage;
739
protected virtual void OnInsertPageBefore(
Page
page,
Page
before)
771
protected async virtual Task<
Page
> OnPopAsync(bool animated)
776
List<
Page
> stack = _navStack.ToList();
790
var
page = _navStack[_navStack.Count - 1];
829
var
page = _navStack[_navStack.Count - 1];
837
_navStack = new List<
Page
> { null };
854
protected virtual Task OnPushAsync(
Page
page, bool animated)
856
List<
Page
> stack = _navStack.ToList();
886
internal async Task PopModalStackToPage(
Page
page, bool? animated)
894
var
pageToPop = Navigation.ModalStack[Navigation.ModalStack.Count - 1];
919
protected virtual void OnRemovePage(
Page
page)
973
var
presentedPage = sectionController.PresentedPage;
983
(sender as
Page
).ParentSet -= OnPresentedPageParentSet;
1020
void AddPage(
Page
page)
1025
void RemovePage(
Page
page)
1060
protected override IReadOnlyList<
Page
> GetNavigationStack() => _owner.GetNavigationStack();
1062
protected override async Task<
Page
> OnPopAsync(bool animated)
1075
var
returnedPage = (_owner as IShellSectionController).PresentedPage;
1111
protected override Task OnPushAsync(
Page
page, bool animated)
1127
internal Task PushModalInnerAsync(
Page
modal, bool animated)
1134
internal Task<
Page
> PopModalInnerAsync(bool animated)
1139
protected override async Task OnPushModal(
Page
modal, bool animated)
1162
protected async override Task<
Page
> OnPopModal(bool animated)
1167
var
page = ModalStack[ModalStack.Count - 1];
1172
protected override void OnRemovePage(
Page
page)
1197
protected override void OnInsertPageBefore(
Page
page,
Page
before)
1226
ShellNavigationState GetUpdatedStatus(IReadOnlyList<
Page
> stack)
1286
public IReadOnlyList<
Page
> Stack => section.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);
439
internal void OnModalPopped(
Page
modalPage)
454
internal bool OnModalPopping(
Page
modalPage)
462
internal void OnModalPushed(
Page
modalPage)
475
internal void OnModalPushing(
Page
modalPage)
605
if (oldValue is
Page
oldPage)
609
void OnPageChanged(
Page
? oldPage,
Page
? newPage)
700
protected override void OnInsertPageBefore(
Page
page,
Page
before)
705
protected override Task OnPushAsync(
Page
page, bool animated)
710
protected override Task<
Page
> OnPopAsync(bool animated)
720
protected override void OnRemovePage(
Page
page)
725
protected override IReadOnlyList<
Page
> GetModalStack()
730
protected override Task<
Page
?> OnPopModal(bool animated)
735
protected override Task OnPushModal(
Page
modal, bool animated)