153 references to NavigationPage
Microsoft.Maui.Controls (143)
Compatibility\Handlers\FlyoutPage\iOS\PhoneFlyoutPageRenderer.cs (1)
565
if (!(FlyoutPage?.Detail is
NavigationPage
))
Compatibility\Handlers\ListView\iOS\ListViewRenderer.cs (2)
232
var
parentNav = e.NewElement.FindParentOfType<
NavigationPage
>();
Compatibility\Handlers\NavigationPage\iOS\NavigationRenderer.cs (41)
42
public static IPropertyMapper<
NavigationPage
, NavigationRenderer> Mapper = new PropertyMapper<
NavigationPage
, NavigationRenderer>(ViewHandler.ViewMapper)
44
[PlatformConfiguration.iOSSpecific.NavigationPage.PrefersLargeTitlesProperty.PropertyName] =
NavigationPage
.MapPrefersLargeTitles,
45
[PlatformConfiguration.iOSSpecific.NavigationPage.IsNavigationBarTranslucentProperty.PropertyName] =
NavigationPage
.MapIsNavigationBarTranslucent,
48
public static CommandMapper<
NavigationPage
, NavigationRenderer> CommandMapper = new CommandMapper<
NavigationPage
, NavigationRenderer>(ViewHandler.ViewCommandMapper);
49
ViewHandlerDelegator<
NavigationPage
> _viewHandlerWrapper;
59
_viewHandlerWrapper = new ViewHandlerDelegator<
NavigationPage
>(Mapper, CommandMapper, this);
72
NavigationPage
NavPage => Element as
NavigationPage
;
82
return VisualElementRenderer<
NavigationPage
>.GetDesiredSize(this, widthConstraint, heightConstraint,
191
_hasNavigationBar =
NavigationPage
.GetHasNavigationBar(current);
215
var
navPage = NavPage;
269
var
navPage = NavPage;
348
System.Diagnostics.Trace.WriteLine($"Pushing a {nameof(FlyoutPage)} onto a {nameof(
NavigationPage
)} is not a supported UI pattern on iOS. " +
475
if (e.PropertyName ==
NavigationPage
.BarBackgroundColorProperty.PropertyName ||
476
e.PropertyName ==
NavigationPage
.BarBackgroundProperty.PropertyName)
480
else if (e.PropertyName ==
NavigationPage
.BarTextColorProperty.PropertyName
490
else if (e.PropertyName ==
NavigationPage
.CurrentPageProperty.PropertyName)
507
else if (e.PropertyName ==
NavigationPage
.BackButtonTitleProperty.PropertyName || e.PropertyName ==
NavigationPage
.TitleProperty.PropertyName)
530
if (_hasNavigationBar !=
NavigationPage
.GetHasNavigationBar(newCurrentPage))
823
var iconColor = Current is Page current ?
NavigationPage
.GetIconColor(current) : null;
1114
if (r.Element is
NavigationPage
np && !_finishedWithInitialNavigation)
1375
if (e.PropertyName ==
NavigationPage
.HasNavigationBarProperty.PropertyName)
1379
else if (e.PropertyName ==
NavigationPage
.HasBackButtonProperty.PropertyName)
1385
else if (e.PropertyName ==
NavigationPage
.TitleIconImageSourceProperty.PropertyName ||
1386
e.PropertyName ==
NavigationPage
.TitleViewProperty.PropertyName)
1388
else if (e.PropertyName ==
NavigationPage
.IconColorProperty.PropertyName)
1478
if (firstPage != pageBeingRemoved && currentChild != firstPage &&
NavigationPage
.GetHasBackButton(currentChild))
1488
public bool NeedsTitleViewContainer(Page page) =>
NavigationPage
.GetTitleIconImageSource(page) != null ||
NavigationPage
.GetTitleView(page) != null;
1490
internal void UpdateBackButtonTitle(Page page) => UpdateBackButtonTitle(page.Title,
NavigationPage
.GetBackButtonTitle(page));
1509
ImageSource titleIcon =
NavigationPage
.GetTitleIconImageSource(page);
1510
View titleView =
NavigationPage
.GetTitleView(page);
1513
string backButtonText =
NavigationPage
.GetBackButtonTitle(page);
1514
bool isBackButtonTextSet = page.IsSet(
NavigationPage
.BackButtonTitleProperty);
1600
if (Child is not Page child || NavigationItem.HidesBackButton == !
NavigationPage
.GetHasBackButton(child))
1603
NavigationItem.HidesBackButton = !
NavigationPage
.GetHasBackButton(child);
1620
var hasNavBar =
NavigationPage
.GetHasNavigationBar(current);
1782
void ElementChanged(ElementChangedEventArgs<
NavigationPage
> e)
Hosting\AppHostBuilderExtensions.cs (1)
140
handlersCollection.AddHandler(typeof(
NavigationPage
), typeof(Handlers.Compatibility.NavigationRenderer));
Menu\MenuItemTracker.cs (1)
170
if (propertyChangedEventArgs.PropertyName ==
NavigationPage
.CurrentPageProperty.PropertyName ||
NavigationPage\NavigationPage.cs (16)
15
public partial class NavigationPage : Page, IPageContainer<Page>, IBarElement, IElementConfiguration<
NavigationPage
>, IStackNavigationView, IToolbarElement
25
public static readonly BindableProperty HasBackButtonProperty = BindableProperty.CreateAttached("HasBackButton", typeof(bool), typeof(
NavigationPage
), true);
37
public static readonly BindableProperty TitleIconImageSourceProperty = BindableProperty.CreateAttached("TitleIconImageSource", typeof(ImageSource), typeof(
NavigationPage
), default(ImageSource));
40
public static readonly BindableProperty IconColorProperty = BindableProperty.CreateAttached("IconColor", typeof(Color), typeof(
NavigationPage
), null);
43
public static readonly BindableProperty TitleViewProperty = BindableProperty.CreateAttached("TitleView", typeof(View), typeof(
NavigationPage
), null,
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);
79
_platformConfigurationRegistry = new Lazy<PlatformConfigurationRegistry<
NavigationPage
>>(() => new PlatformConfigurationRegistry<
NavigationPage
>(this));
241
Application.Current?.FindMauiContext()?.CreateLogger<
NavigationPage
>()?.LogWarning(e, null);
419
readonly Lazy<PlatformConfigurationRegistry<
NavigationPage
>> _platformConfigurationRegistry;
422
public new IPlatformElementConfiguration<T,
NavigationPage
> On<T>() where T : IConfigPlatform
516
if (newValue is Page newPage && ((
NavigationPage
)bindable).HasAppeared)
725
public MauiNavigationImpl(
NavigationPage
owner)
731
NavigationPage
Owner { get; }
881
Application.Current?.FindMauiContext()?.CreateLogger<
NavigationPage
>()?.LogWarning("RemovePage called for CurrentPage object. This can result in undesired behavior, consider calling PopAsync instead.");
NavigationPage\NavigationPage.iOS.cs (4)
8
public static void MapPrefersLargeTitles(NavigationViewHandler handler,
NavigationPage
navigationPage) =>
11
public static void MapIsNavigationBarTranslucent(NavigationViewHandler handler,
NavigationPage
navigationPage) =>
14
public static void MapPrefersLargeTitles(INavigationViewHandler handler,
NavigationPage
navigationPage)
20
public static void MapIsNavigationBarTranslucent(INavigationViewHandler handler,
NavigationPage
navigationPage)
NavigationPage\NavigationPage.Legacy.cs (3)
241
Application.Current?.FindMauiContext()?.CreateLogger<
NavigationPage
>()?.LogWarning("RemovePage called for CurrentPage object. This can result in undesired behavior, consider calling PopAsync instead.");
260
public NavigationImpl(
NavigationPage
owner)
266
NavigationPage
Owner { get; }
NavigationPage\NavigationPage.Mapper.cs (2)
13
NavigationViewHandler.Mapper.ReplaceMapping<
NavigationPage
, NavigationViewHandler>(PlatformConfiguration.iOSSpecific.NavigationPage.PrefersLargeTitlesProperty.PropertyName, MapPrefersLargeTitles);
14
NavigationViewHandler.Mapper.ReplaceMapping<
NavigationPage
, NavigationViewHandler>(PlatformConfiguration.iOSSpecific.NavigationPage.IsNavigationBarTranslucentProperty.PropertyName, MapIsNavigationBarTranslucent);
NavigationPage\NavigationPageToolbar.cs (29)
11
NavigationPage
_currentNavigationPage;
22
List<
NavigationPage
> _navigationPagesStack = new List<
NavigationPage
>();
23
internal
NavigationPage
CurrentNavigationPage => _currentNavigationPage;
46
if (e.IsOneOf(
NavigationPage
.HasNavigationBarProperty,
47
NavigationPage
.HasBackButtonProperty,
48
NavigationPage
.TitleIconImageSourceProperty,
49
NavigationPage
.TitleViewProperty,
50
NavigationPage
.IconColorProperty) ||
53
NavigationPage
.BarBackgroundColorProperty,
54
NavigationPage
.BarBackgroundProperty,
55
NavigationPage
.BarTextColorProperty) ||
62
else if (_currentPage != sender && sender == _currentNavigationPage && e.Is(
NavigationPage
.CurrentPageProperty))
75
_currentNavigationPage = _currentPage.FindParentOfType<
NavigationPage
>();
77
foreach (
var
navPage in _navigationPagesStack)
94
var
parentNavigationPage = _currentNavigationPage.FindParentOfType<
NavigationPage
>();
100
parentNavigationPage = parentNavigationPage.FindParentOfType<
NavigationPage
>();
106
foreach (
var
navPage in _navigationPagesStack)
131
return
NavigationPage
.GetHasBackButton(_currentPage) && GetBackButtonVisibleCalculated(false).Value;
145
foreach (
var
navPage in _navigationPagesStack)
182
if (_currentPage.IsSet(
NavigationPage
.HasBackButtonProperty))
206
void ApplyChanges(
NavigationPage
navigationPage)
222
IsVisible =
NavigationPage
.GetHasNavigationBar(currentPage) && _hasAppeared;
232
BackButtonTitle =
NavigationPage
.GetBackButtonTitle(previousPage);
236
TitleIcon =
NavigationPage
.GetTitleIconImageSource(currentPage);
268
Color GetIconColor() => (_currentPage != null) ?
NavigationPage
.GetIconColor(_currentPage) : null;
294
return
NavigationPage
.GetTitleView(target);
309
foreach (
var
navPage in _navigationPagesStack)
Page\Page.cs (1)
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.
Platform\iOS\Extensions\NavigationPageExtensions.cs (2)
10
public static void UpdatePrefersLargeTitles(this UINavigationController platformView,
NavigationPage
navigationPage)
19
public static void UpdateIsNavigationBarTranslucent(this UINavigationController platformView,
NavigationPage
navigationPage)
PlatformConfiguration\AndroidSpecific\AppCompat\NavigationPage.cs (4)
4
using FormsElement = Maui.Controls.
NavigationPage
;
25
public static int GetBarHeight(this IPlatformElementConfiguration<Android,
FormsElement
> config)
31
public static IPlatformElementConfiguration<Android,
FormsElement
> SetBarHeight(this IPlatformElementConfiguration<Android,
FormsElement
> config, int value)
PlatformConfiguration\GTKSpecific\NavigationPage.cs (4)
4
using FormsElement = Maui.Controls.
NavigationPage
;
28
this IPlatformElementConfiguration<GTK,
FormsElement
> config)
34
public static IPlatformElementConfiguration<GTK,
FormsElement
> SetBackButtonIcon(
35
this IPlatformElementConfiguration<GTK,
FormsElement
> config, string value)
PlatformConfiguration\iOSSpecific\NavigationPage.cs (17)
5
using FormsElement = Maui.Controls.
NavigationPage
;
29
public static bool IsNavigationBarTranslucent(this IPlatformElementConfiguration<iOS,
FormsElement
> config)
35
public static IPlatformElementConfiguration<iOS,
FormsElement
> SetIsNavigationBarTranslucent(this IPlatformElementConfiguration<iOS,
FormsElement
> config, bool value)
42
public static IPlatformElementConfiguration<iOS,
FormsElement
> EnableTranslucentNavigationBar(this IPlatformElementConfiguration<iOS,
FormsElement
> config)
49
public static IPlatformElementConfiguration<iOS,
FormsElement
> DisableTranslucentNavigationBar(this IPlatformElementConfiguration<iOS,
FormsElement
> config)
76
public static StatusBarTextColorMode GetStatusBarTextColorMode(this IPlatformElementConfiguration<iOS,
FormsElement
> config)
82
public static IPlatformElementConfiguration<iOS,
FormsElement
> SetStatusBarTextColorMode(this IPlatformElementConfiguration<iOS,
FormsElement
> config, StatusBarTextColorMode value)
106
public static IPlatformElementConfiguration<iOS,
FormsElement
> SetPrefersLargeTitles(this IPlatformElementConfiguration<iOS,
FormsElement
> config, bool value)
113
public static bool PrefersLargeTitles(this IPlatformElementConfiguration<iOS,
FormsElement
> config)
136
public static IPlatformElementConfiguration<iOS,
FormsElement
> SetHideNavigationBarSeparator(this IPlatformElementConfiguration<iOS,
FormsElement
> config, bool value)
143
public static bool HideNavigationBarSeparator(this IPlatformElementConfiguration<iOS,
FormsElement
> config)
PlatformConfiguration\macOSSpecific\NavigationPage.cs (5)
4
using FormsElement = Maui.Controls.
NavigationPage
;
28
public static NavigationTransitionStyle GetNavigationTransitionPushStyle(this IPlatformElementConfiguration<macOS,
FormsElement
> config)
48
public static NavigationTransitionStyle GetNavigationTransitionPopStyle(this IPlatformElementConfiguration<macOS,
FormsElement
> config)
62
public static IPlatformElementConfiguration<macOS,
FormsElement
> SetNavigationTransitionStyle(this IPlatformElementConfiguration<macOS,
FormsElement
> config, NavigationTransitionStyle pushStyle, NavigationTransitionStyle popStyle)
PlatformConfiguration\TizenSpecific\NavigationPage.cs (5)
4
using FormsElement = Maui.Controls.
NavigationPage
;
12
= BindableProperty.CreateAttached("HasBreadCrumbsBar", typeof(bool), typeof(
FormsElement
), false);
27
public static bool HasBreadCrumbsBar(this IPlatformElementConfiguration<Tizen,
FormsElement
> config)
33
public static IPlatformElementConfiguration<Tizen,
FormsElement
> SetHasBreadCrumbsBar(this IPlatformElementConfiguration<Tizen,
FormsElement
> config, bool value)
Shell\ShellContent.cs (1)
104
if (result is
NavigationPage
)
Shell\ShellSection.cs (4)
58
if (Navigation.ModalStack[Navigation.ModalStack.Count - 1] is
NavigationPage
np)
547
NavigationPage
activeModalNavigationPage = null;
550
if (Navigation.ModalStack[i] is
NavigationPage
np)
564
if (modalPage is
NavigationPage
np)
Microsoft.Maui.Controls.Compatibility (10)
Tizen\Renderers\NavigationPageRenderer.cs (9)
25
public class NavigationPageRenderer : VisualElementRenderer<
NavigationPage
>
37
protected override void OnElementChanged(ElementChangedEventArgs<
NavigationPage
> e)
82
if (e.PropertyName ==
NavigationPage
.CurrentPageProperty.PropertyName)
133
if (e.PropertyName ==
NavigationPage
.HasNavigationBarProperty.PropertyName)
135
else if (e.PropertyName ==
NavigationPage
.HasBackButtonProperty.PropertyName)
255
if (!
NavigationPage
.GetHasNavigationBar(page))
286
var hasBackButton =
NavigationPage
.GetHasBackButton(page) && Control.Stack.Count > 0 && Control.Stack.IndexOf(naviPage) != 0;
382
View titleView =
NavigationPage
.GetTitleView(page);
403
View titleView =
NavigationPage
.GetTitleView(page);
Tizen\StaticRegistrar.cs (1)
76
Registered.Register(typeof(
NavigationPage
), () => new NavigationPageRenderer());