2 types derived from BaseShellItem
Microsoft.Maui.Controls (2)
Shell\ShellContent.cs (1)
15
public class ShellContent :
BaseShellItem
, IShellContentController, IVisualTreeElement
Shell\ShellGroupItem.cs (1)
7
public class ShellGroupItem :
BaseShellItem
88 references to BaseShellItem
Microsoft.Maui.Controls (88)
Internals\PropertyPropagationExtensions.cs (3)
23
BaseShellItem
.PropagateFromParent(Shell.NavBarHasShadowProperty, element);
26
BaseShellItem
.PropagateFromParent(Shell.TabBarIsVisibleProperty, element);
29
BaseShellItem
.PropagateFromParent(Shell.NavBarIsVisibleProperty, element);
Page\Page.cs (3)
470
if (RealParent is
BaseShellItem
|| RealParent is Shell)
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
))
Shell\BaseShellItem.cs (21)
32
internal static readonly BindablePropertyKey IsCheckedPropertyKey = BindableProperty.CreateReadOnly(nameof(IsChecked), typeof(bool), typeof(
BaseShellItem
), false);
38
BindableProperty.Create(nameof(FlyoutIcon), typeof(ImageSource), typeof(
BaseShellItem
), null, BindingMode.OneTime);
42
BindableProperty.Create(nameof(Icon), typeof(ImageSource), typeof(
BaseShellItem
), null, BindingMode.OneWay,
50
BindableProperty.Create(nameof(IsEnabled), typeof(bool), typeof(
BaseShellItem
), true, BindingMode.OneWay);
54
BindableProperty.Create(nameof(Title), typeof(string), typeof(
BaseShellItem
), null, BindingMode.TwoWay, propertyChanged: OnTitlePropertyChanged);
58
BindableProperty.Create(nameof(IsVisible), typeof(bool), typeof(
BaseShellItem
), true);
62
BindableProperty.Create(nameof(FlyoutItemIsVisible), typeof(bool), typeof(
BaseShellItem
), true, propertyChanged: OnFlyoutItemIsVisibleChanged);
219
var
shellItem = (
BaseShellItem
)bindable;
229
var
shellItem = (
BaseShellItem
)bindable;
297
nameof(Window), typeof(Window), typeof(
BaseShellItem
), null);
343
var
parent = (
BaseShellItem
)Parent;
451
imageBinding = Binding.Create(static (
BaseShellItem
item) => item.FlyoutIcon);
452
labelBinding = Binding.Create(static (
BaseShellItem
item) => item.Title);
543
if (g.BindingContext is
BaseShellItem
bsi)
551
g.SetBinding(SemanticProperties.DescriptionProperty, static (
BaseShellItem
item) => item.Title);
564
/// Provides a debug view for the <see cref="
BaseShellItem
"/> class.
566
/// <param name="baseShellItem">The <see cref="
BaseShellItem
"/> instance to debug.</param>
567
private protected class BaseShellItemDebugView(
BaseShellItem
baseShellItem)
Shell\RouteRequestBuilder.cs (2)
76
bool AddNode(
BaseShellItem
baseShellItem, string nextSegment)
89
string GetUserSegment(
BaseShellItem
baseShellItem)
Shell\Shell.cs (6)
76
?? (bindable as
BaseShellItem
)?.FindParentOfType<Shell>()
127
if (bindable is
BaseShellItem
baseShellItem && baseShellItem.FlyoutItemIsVisible != (bool)newValue)
664
return
BaseShellItem
.CreateDefaultFlyoutItemCell(bo);
1246
bool IsValidRoute(
BaseShellItem
baseShellItem)
1686
if (root is
BaseShellItem
baseItem)
1690
baseItem.SetValue(
BaseShellItem
.IsCheckedPropertyKey, isChecked);
Shell\ShellContentCollection.cs (1)
20
protected override bool IsShellElementVisible(
BaseShellItem
item)
Shell\ShellElementCollection.cs (30)
14
IList<
BaseShellItem
>,
74
public IReadOnlyCollection<
BaseShellItem
> VisibleItemsReadOnly
102
public
BaseShellItem
this[int index]
104
get => (
BaseShellItem
)Inner[index];
110
var list = Inner.Cast<
BaseShellItem
>().ToList();
125
public virtual void Add(
BaseShellItem
item) => Inner.Add(item);
127
public virtual bool Contains(
BaseShellItem
item) => Inner.Contains(item);
129
public virtual void CopyTo(
BaseShellItem
[] array, int arrayIndex) => Inner.CopyTo(array, arrayIndex);
131
public abstract IEnumerator<
BaseShellItem
> GetEnumerator();
133
public virtual int IndexOf(
BaseShellItem
item) => Inner.IndexOf(item);
135
public virtual void Insert(int index,
BaseShellItem
item) => Inner.Insert(index, item);
137
public abstract bool Remove(
BaseShellItem
item);
149
foreach (
BaseShellItem
element in e.NewItems)
168
foreach (
BaseShellItem
element in items)
178
protected void CheckVisibility(
BaseShellItem
element)
208
bool IsBaseShellItemVisible(
BaseShellItem
item)
223
protected virtual bool IsShellElementVisible(
BaseShellItem
item)
236
if (controller is
BaseShellItem
bsi)
247
if (controller is
BaseShellItem
bsi)
253
if (e.PropertyName == nameof(
BaseShellItem
.IsVisible))
254
CheckVisibility((
BaseShellItem
)sender);
259
foreach (
BaseShellItem
bsi in (e.NewItems ?? e.OldItems ?? Inner))
264
CheckVisibility(bsi.Parent as
BaseShellItem
);
269
var
baseShellItem = (
BaseShellItem
)s;
271
CheckVisibility(baseShellItem.Parent as
BaseShellItem
);
280
where TBaseShellItem :
BaseShellItem
328
public override IEnumerator<
BaseShellItem
> GetEnumerator()
330
return Inner.Cast<
BaseShellItem
>().GetEnumerator();
333
public override bool Remove(
BaseShellItem
item)
Shell\ShellExtensions.cs (13)
10
public static T SearchForRoute<T>(this Shell shell, string route) where T :
BaseShellItem
=>
13
public static
BaseShellItem
SearchForRoute(this Shell shell, string route) =>
17
public static T SearchForRoute<T>(this
BaseShellItem
shell, string route) where T :
BaseShellItem
=>
20
public static
BaseShellItem
SearchForRoute(this
BaseShellItem
shell, string route) =>
24
public static
BaseShellItem
SearchForPart(this IShellController shell, Func<
BaseShellItem
, bool> searchBy)
29
var
result = SearchForPart(items[i], searchBy);
37
public static
BaseShellItem
SearchForPart(this
BaseShellItem
part, Func<
BaseShellItem
, bool> searchBy)
42
BaseShellItem
baseShellItem = null;
Shell\ShellItem.cs (3)
33
public static readonly new BindableProperty IsVisibleProperty =
BaseShellItem
.IsVisibleProperty;
284
if (oldValue is
BaseShellItem
oldShellItem)
294
if (newValue is
BaseShellItem
newShellItem)
Shell\ShellNavigationManager.cs (3)
258
BaseShellItem
baseShellItem = _shell.CurrentItem?.CurrentItem?.CurrentItem;
304
if (!(element is
BaseShellItem
baseShellItem))
305
baseShellItem = element?.Parent as
BaseShellItem
;
Shell\ShellSection.cs (3)
298
shellSection.SetBinding(TitleProperty, static (
BaseShellItem
item) => item.Title, BindingMode.OneWay, source: shellContent);
299
shellSection.SetBinding(IconProperty, static (
BaseShellItem
item) => item.Icon, BindingMode.OneWay, source: shellContent);
300
shellSection.SetBinding(FlyoutIconProperty, static (
BaseShellItem
item) => item.FlyoutIcon, BindingMode.OneWay, source: shellContent);