234 references to Shell
Microsoft.Maui.Controls (234)
BindableObject.cs (2)
396 if (Shell.GetBackButtonBehavior(this) is BackButtonBehavior buttonBehavior) 399 if (Shell.GetSearchHandler(this) is SearchHandler searchHandler)
Internals\PropertyPropagationExtensions.cs (6)
22 if (propertyName == null || propertyName == Shell.NavBarHasShadowProperty.PropertyName) 23 BaseShellItem.PropagateFromParent(Shell.NavBarHasShadowProperty, element); 25 if (propertyName == null || propertyName == Shell.TabBarIsVisibleProperty.PropertyName) 26 BaseShellItem.PropagateFromParent(Shell.TabBarIsVisibleProperty, element); 28 if (propertyName == null || propertyName == Shell.NavBarIsVisibleProperty.PropertyName) 29 BaseShellItem.PropagateFromParent(Shell.NavBarIsVisibleProperty, element);
Menu\MenuItemTracker.cs (5)
130 else if (page is Shell shell) 209 if (page is Shell shell) 230 if (((Shell)sender).GetCurrentShellPage() is Page page) 236 if (((Shell)sender).GetCurrentShellPage() is Page page) 263 if (page is Shell shell)
NavigationModel.cs (2)
114 _navTree[0][0] is not Shell) 202 _navTree[0][0] is not Shell)
Page\Page.cs (1)
470 if (RealParent is BaseShellItem || RealParent is Shell)
Platform\ModalNavigationManager\ModalNavigationManager.cs (4)
33 if (currentPage is Shell shell) 42 bool FireLifeCycleEvents => _window?.Page is not Shell; 224 if (_window.Page is Shell shell) 271 if (_window.Page is Shell shell)
Platform\PageExtensions.cs (1)
15 else if (currentPage is Shell shell && shell.CurrentItem?.CurrentItem is IShellSectionController ssc)
Properties\AssemblyInfo.cs (22)
169[assembly: StyleProperty("-maui-flyout-background", typeof(Shell), nameof(Shell.FlyoutBackgroundColorProperty))] 170[assembly: StyleProperty("-maui-shell-background", typeof(Element), nameof(Shell.BackgroundColorProperty), PropertyOwnerType = typeof(Shell))] 171[assembly: StyleProperty("-maui-shell-disabled", typeof(Element), nameof(Shell.DisabledColorProperty), PropertyOwnerType = typeof(Shell))] 172[assembly: StyleProperty("-maui-shell-foreground", typeof(Element), nameof(Shell.ForegroundColorProperty), PropertyOwnerType = typeof(Shell))] 173[assembly: StyleProperty("-maui-shell-tabbar-background", typeof(Element), nameof(Shell.TabBarBackgroundColorProperty), PropertyOwnerType = typeof(Shell))] 174[assembly: StyleProperty("-maui-shell-tabbar-disabled", typeof(Element), nameof(Shell.TabBarDisabledColorProperty), PropertyOwnerType = typeof(Shell))] 175[assembly: StyleProperty("-maui-shell-tabbar-foreground", typeof(Element), nameof(Shell.TabBarForegroundColorProperty), PropertyOwnerType = typeof(Shell))] 176[assembly: StyleProperty("-maui-shell-tabbar-title", typeof(Element), nameof(Shell.TabBarTitleColorProperty), PropertyOwnerType = typeof(Shell))] 177[assembly: StyleProperty("-maui-shell-tabbar-unselected", typeof(Element), nameof(Shell.TabBarUnselectedColorProperty), PropertyOwnerType = typeof(Shell))] 178[assembly: StyleProperty("-maui-shell-title", typeof(Element), nameof(Shell.TitleColorProperty), PropertyOwnerType = typeof(Shell))] 179[assembly: StyleProperty("-maui-shell-unselected", typeof(Element), nameof(Shell.UnselectedColorProperty), PropertyOwnerType = typeof(Shell))]
Routing.cs (1)
40 internal static void RegisterImplicitPageRoutes(Shell shell)
Shell\BaseShellItem.cs (7)
220 if (shellItem.FindParentOfType<Shell>()?.Toolbar is ShellToolbar st) 235 Shell.SetFlyoutItemIsVisible(bindable, (bool)newValue); 243 if (propertyName == Shell.ItemTemplateProperty.PropertyName || propertyName == nameof(Parent)) 244 Propagate(Shell.ItemTemplateProperty, this, Parent, true); 264 if (to is Shell) 340 if (Parent is Shell) 538 var styleClassSource = Shell.GetBindableObjectWithFlyoutItemTemplate(bo) as IStyleSelectable;
Shell\MenuShellItem.cs (11)
16 Shell.SetFlyoutItemIsVisible(this, Shell.GetFlyoutItemIsVisible(menuItem)); 32 if (e.PropertyName == Shell.MenuItemTemplateProperty.PropertyName) 33 Shell.SetMenuItemTemplate(this, Shell.GetMenuItemTemplate(MenuItem)); 36 else if (e.PropertyName == Shell.FlyoutItemIsVisibleProperty.PropertyName) 37 Shell.SetFlyoutItemIsVisible(this, Shell.GetFlyoutItemIsVisible(MenuItem)); 45 else if (propertyName == Shell.FlyoutItemIsVisibleProperty.PropertyName && MenuItem != null) 46 Shell.SetFlyoutItemIsVisible(MenuItem, Shell.GetFlyoutItemIsVisible(this));
Shell\RequestDefinition.cs (1)
11 public RequestDefinition(RouteRequestBuilder theWinningRoute, Shell shell)
Shell\RouteRequestBuilder.cs (3)
19 public Shell Shell { get; private set; } 109 case Shell shell: 154 if (Item?.Parent is Shell s)
Shell\Shell.cs (84)
37 BindableProperty.CreateAttached("BackButtonBehavior", typeof(BackButtonBehavior), typeof(Shell), null, BindingMode.OneTime, 52 public static readonly BindableProperty PresentationModeProperty = BindableProperty.CreateAttached("PresentationMode", typeof(PresentationMode), typeof(Shell), PresentationMode.Animated); 62 BindableProperty.CreateAttached(nameof(FlyoutBehavior), typeof(FlyoutBehavior), typeof(Shell), FlyoutBehavior.Flyout, 69 BindableProperty.CreateAttached("NavBarIsVisible", typeof(bool), typeof(Shell), true, propertyChanged: OnNavBarIsVisibleChanged); 75 Shell shell = bindable as Shell 76 ?? (bindable as BaseShellItem)?.FindParentOfType<Shell>() 77 ?? (bindable as Page)?.FindParentOfType<Shell>(); 86 BindableProperty.CreateAttached("NavBarHasShadow", typeof(bool), typeof(Shell), default(bool), 90 /// Controls the <see cref = "Shell" /> search functionality. 93 BindableProperty.CreateAttached("SearchHandler", typeof(SearchHandler), typeof(Shell), null, BindingMode.OneTime, 109 BindableProperty.CreateAttached("FlyoutItemIsVisible", typeof(bool), typeof(Shell), true, propertyChanged: OnFlyoutItemIsVisibleChanged); 124 .FindParentOfType<Shell>() 135 /// The tab bar and tabs are visible in <see cref = "Shell" /> applications by default. 138 BindableProperty.CreateAttached("TabBarIsVisible", typeof(bool), typeof(Shell), true); 144 BindableProperty.CreateAttached("TitleView", typeof(View), typeof(Shell), null, propertyChanged: OnTitleViewChanged); 150 BindableProperty.CreateAttached(nameof(MenuItemTemplate), typeof(DataTemplate), typeof(Shell), null, BindingMode.OneTime); 174 BindableProperty.CreateAttached(nameof(ItemTemplate), typeof(DataTemplate), typeof(Shell), null, BindingMode.OneTime); 351 if (element is Shell shell) 362 BindableProperty.CreateAttached("BackgroundColor", typeof(Color), typeof(Shell), null, 369 BindableProperty.CreateAttached("DisabledColor", typeof(Color), typeof(Shell), null, 376 BindableProperty.CreateAttached("ForegroundColor", typeof(Color), typeof(Shell), null, 383 BindableProperty.CreateAttached("TabBarBackgroundColor", typeof(Color), typeof(Shell), null, 390 BindableProperty.CreateAttached("TabBarDisabledColor", typeof(Color), typeof(Shell), null, 395 BindableProperty.CreateAttached("TabBarForegroundColor", typeof(Color), typeof(Shell), null, 402 BindableProperty.CreateAttached("TabBarTitleColor", typeof(Color), typeof(Shell), null, 409 BindableProperty.CreateAttached("TabBarUnselectedColor", typeof(Color), typeof(Shell), null, 416 BindableProperty.CreateAttached("TitleColor", typeof(Color), typeof(Shell), null, 423 BindableProperty.CreateAttached("UnselectedColor", typeof(Color), typeof(Shell), null, 430 BindableProperty.CreateAttached(nameof(FlyoutBackdrop), typeof(Brush), typeof(Shell), Brush.Default, 438 BindableProperty.CreateAttached(nameof(FlyoutWidth), typeof(double), typeof(Shell), -1d, 446 BindableProperty.CreateAttached(nameof(FlyoutHeight), typeof(double), typeof(Shell), -1d, 627 BindableProperty.CreateReadOnly(nameof(CurrentState), typeof(ShellNavigationState), typeof(Shell), null); 629 static readonly BindablePropertyKey ItemsPropertyKey = BindableProperty.CreateReadOnly(nameof(Items), typeof(ShellItemCollection), typeof(Shell), null, 630 defaultValueCreator: bo => new ShellItemCollection { Inner = new ElementCollection<ShellItem>(((Shell)bo).InternalChildren) }); 954 public static Shell Current 963 return Application.Current.Windows[0].Page as Shell; 967 Shell currentShell = null; 968 Shell returnIfThereIsJustOneShell = null; 972 if (window.Page is Shell shell) 1062 BindableProperty.Create(nameof(CurrentItem), typeof(ShellItem), typeof(Shell), null, BindingMode.TwoWay, 1076 BindableProperty.Create(nameof(FlyoutBackgroundImage), typeof(ImageSource), typeof(Shell), default(ImageSource), BindingMode.OneTime); 1082 BindableProperty.Create(nameof(FlyoutBackgroundImageAspect), typeof(Aspect), typeof(Shell), default(Aspect), BindingMode.OneTime); 1088 BindableProperty.Create(nameof(FlyoutBackgroundColor), typeof(Color), typeof(Shell), null, BindingMode.OneTime); 1092 BindableProperty.Create(nameof(FlyoutBackground), typeof(Brush), typeof(Shell), SolidColorBrush.Default, BindingMode.OneTime); 1096 BindableProperty.Create(nameof(FlyoutHeaderBehavior), typeof(FlyoutHeaderBehavior), typeof(Shell), FlyoutHeaderBehavior.Default, BindingMode.OneTime); 1103 BindableProperty.Create(nameof(FlyoutHeader), typeof(object), typeof(Shell), null, BindingMode.OneTime, 1111 BindableProperty.Create(nameof(FlyoutFooter), typeof(object), typeof(Shell), null, BindingMode.OneTime, 1118 BindableProperty.Create(nameof(FlyoutHeaderTemplate), typeof(DataTemplate), typeof(Shell), null, BindingMode.OneTime, 1125 BindableProperty.Create(nameof(FlyoutFooterTemplate), typeof(DataTemplate), typeof(Shell), null, BindingMode.OneTime, 1132 BindableProperty.Create(nameof(FlyoutIsPresented), typeof(bool), typeof(Shell), false, BindingMode.TwoWay); 1142 BindableProperty.Create(nameof(FlyoutIcon), typeof(ImageSource), typeof(Shell), null); 1149 BindableProperty.Create(nameof(FlyoutVerticalScrollMode), typeof(ScrollMode), typeof(Shell), ScrollMode.Auto); 1173 this.SetBinding(Shell.FlyoutBackgroundColorProperty, 1260 Application.Current?.FindMauiContext()?.CreateLogger<Shell>()?.LogWarning(exc, "If you're using hot reload add a route to everything in your shell file"); 1556 Application.Current?.FindMauiContext()?.CreateLogger<Shell>()?.LogWarning(exc, "Failed to Navigate Back"); 1605 CurrentItem?.Handler?.UpdateValue(Shell.TabBarIsVisibleProperty.PropertyName); 1614 if (e.Is(Shell.TabBarIsVisibleProperty)) 1615 CurrentItem?.Handler?.UpdateValue(Shell.TabBarIsVisibleProperty.PropertyName); 1660 var shell = (Shell)bindable; 1672 var shell = (Shell)bindable; 1693 if (root is Shell shell) 1730 var shell = (Shell)bindable; 1736 var shell = (Shell)bindable; 1742 var shell = (Shell)bindable; 1748 var shell = (Shell)bindable; 1758 return GetEffectiveValue(Shell.FlyoutBehaviorProperty, 1955 case Shell shell: 2002 if (propertyName == Shell.FlyoutIsPresentedProperty.PropertyName) 2016 BindableProperty.Create(nameof(FlyoutContent), typeof(object), typeof(Shell), null, BindingMode.OneTime, propertyChanging: OnFlyoutContentChanging); 2023 BindableProperty.Create(nameof(FlyoutContentTemplate), typeof(DataTemplate), typeof(Shell), null, BindingMode.OneTime, propertyChanging: OnFlyoutContentTemplateChanging); 2067 var shell = (Shell)bindable; 2073 var shell = (Shell)bindable; 2080 readonly Shell _shell; 2084 public NavigationImpl(Shell shell) => _shell = shell; 2161 private sealed class ShellDebugView(Shell shell)
Shell\ShellAppearance.cs (13)
15 Shell.BackgroundColorProperty, 16 Shell.DisabledColorProperty, 17 Shell.ForegroundColorProperty, 18 Shell.TabBarBackgroundColorProperty, 19 Shell.TabBarDisabledColorProperty, 20 Shell.TabBarForegroundColorProperty, 21 Shell.TabBarTitleColorProperty, 22 Shell.TabBarUnselectedColorProperty, 23 Shell.TitleColorProperty, 24 Shell.UnselectedColorProperty 29 Shell.FlyoutBackdropProperty 34 Shell.FlyoutWidthProperty, 35 Shell.FlyoutHeightProperty
Shell\ShellContent.cs (4)
155 this.FindParentOfType<Shell>().SendPageAppearing(page); 161 this.FindParentOfType<Shell>().SendPageAppearing(page); 232 Shell shell = null; 236 shellItem.Parent is Shell shellInstance)
Shell\ShellExtensions.cs (2)
10 public static T SearchForRoute<T>(this Shell shell, string route) where T : BaseShellItem => 13 public static BaseShellItem SearchForRoute(this Shell shell, string route) =>
Shell\ShellFlyoutItemsManager.cs (4)
11 readonly Shell _shell; 18 public ShellFlyoutItemsManager(Shell shell) 211 return Shell.GetFlyoutItemIsVisible(msi.MenuItem); 213 return Shell.GetFlyoutItemIsVisible(bo);
Shell\ShellGroupItem.cs (1)
15 ((Element)bindable).FindParentOfType<Shell>()?.SendFlyoutItemsChanged();
Shell\ShellItem.cs (7)
103 Shell shell = Parent as Shell; 129 return shell.GetEffectiveValue<bool>(Shell.TabBarIsVisibleProperty, () => defaultShowTabs, null, displayedPage); 193 internal bool IsVisibleItem => Parent is Shell shell && shell?.CurrentItem == this; 197 if (Parent is Shell shell) 292 if (shellItem.Parent is Shell) 330 if (CurrentItem != null && Parent is Shell shell && shell.CurrentItem == this)
Shell\ShellNavigationManager.cs (6)
13 readonly Shell _shell; 20 public ShellNavigationManager(Shell shell) 148 _shell.SetValueFromRenderer(Shell.CurrentItemProperty, shellItem); 272 void FireNavigatedEvents(ShellNavigatedEventArgs a, Shell shell) 407 public static ShellNavigationSource CalculateNavigationSource(Shell shell, ShellNavigationState current, ShellNavigationRequest request) 575 public static List<Page> BuildFlattenedNavigationStack(Shell shell)
Shell\ShellSection.cs (11)
274 Shell Shell => Parent?.Parent as Shell; 628 return (Shell.GetPresentationMode(bo) & PresentationMode.Modal) == PresentationMode.Modal; 633 return (Shell.GetPresentationMode(bo) & PresentationMode.NotAnimated) != PresentationMode.NotAnimated; 638 if (Parent?.Parent is Shell shell) 909 bool isAnimated = animated ?? (Shell.GetPresentationMode(pageToPop) & PresentationMode.NotAnimated) != PresentationMode.NotAnimated; 956 internal bool IsVisibleSection => Parent?.Parent is Shell shell && shell.CurrentItem?.CurrentItem == this; 989 this.FindParentOfType<Shell>().SendPageAppearing(presentedPage); 1092 var shell = _owner.Shell; 1149 Shell.SetPresentationMode(modal, PresentationMode.ModalAnimated); 1151 Shell.SetPresentationMode(modal, PresentationMode.ModalNotAnimated);
Shell\ShellTemplatedViewManager.cs (1)
50 Shell shell)
Shell\ShellUriHandler.cs (14)
17 internal static Uri FormatUri(Uri path, Shell shell) 131 public static Uri ConvertToStandardFormat(Shell shell, Uri request) 176 internal static ShellNavigationRequest GetNavigationRequest(Shell shell, Uri uri, bool enableRelativeShellRoutes = false, bool throwNavigationErrorAsException = true, ShellNavigationParameters shellNavigationParameters = null) 222 internal static List<RouteRequestBuilder> GenerateRoutePaths(Shell shell, Uri request) 228 internal static List<RouteRequestBuilder> GenerateRoutePaths(Shell shell, Uri request, Uri originalRequest, bool enableRelativeShellRoutes) 346 Shell shell, 716 public Shell Shell { get; private set; } 724 public static NodeLocation Create(Shell shell) 740 case Shell shell: 751 Shell = (Shell)Item.Parent; 760 Shell = (Shell)Item.Parent; 774 Shell = (Shell)Item.Parent; 928 case Shell shell: 979 if (key.StartsWith(_pathSeparator, StringComparison.Ordinal) && !(node is Shell))
ShellToolbar.cs (17)
13 Shell _shell; 24 public ShellToolbar(Shell shell) : base(shell) 33 Shell.CurrentItemProperty, 34 Shell.FlyoutBehaviorProperty, 35 Shell.BackButtonBehaviorProperty, 36 Shell.NavBarIsVisibleProperty, 37 Shell.TitleViewProperty)) 41 else if (p.Is(Shell.TitleProperty)) 104 if (_shell.IsSet(Shell.NavBarIsVisibleProperty)) 105 return (bool)_shell.GetValue(Shell.NavBarIsVisibleProperty); 122 IsVisible = _shell.GetEffectiveValue(Shell.NavBarIsVisibleProperty, getDefaultNavBarIsVisible, observer: null); 130 var bbb = Shell.GetBackButtonBehavior(_currentPage); 154 Shell.BackButtonBehaviorProperty, 155 Shell.NavBarIsVisibleProperty, 156 Shell.TitleViewProperty)) 165 Shell.TitleViewProperty, 166 Shell.GetTitleView(_shell));
Window\Window.cs (4)
112 string? ITitledElement.Title => Title ?? (Page as Shell)?.Title; 620 if (oldPage is Shell shell) 642 if (newPage is Shell newShell) 672 if (e.PropertyName == nameof(Shell.Title))