18 types derived from Element
Microsoft.Maui.Controls (16)
Application\Application.cs (1)
18 public partial class Application : Element, IResourcesProvider, IApplicationController, IElementConfiguration<Application>, IVisualTreeElement, IApplication
AppLinkEntry.cs (1)
8 public class AppLinkEntry : Element, IAppLinkEntry
AppThemeBinding.cs (1)
12 class AppThemeProxy : Element
Brush\Brush.cs (1)
12 public abstract partial class Brush : Element
Cells\Cell.cs (1)
14 public abstract class Cell : Element, ICellController, IFlowDirectionController, IPropertyPropagationController, IVisualController, IWindowController, IVisualTreeElement
FormattedString.cs (1)
14 public class FormattedString : Element
GestureElement.cs (1)
11 public class GestureElement : Element, ISpatialElement, IGestureRecognizers
GestureRecognizer.cs (1)
4 public class GestureRecognizer : Element, IGestureRecognizer
GradientStop.cs (1)
7 public class GradientStop : Element
ImageSource.cs (1)
12 public abstract partial class ImageSource : Element
Menu\FlyoutBase.cs (1)
4 public abstract class FlyoutBase : Element, IFlyout
Menu\MenuBar.cs (1)
9 public partial class MenuBar : Element, IMenuBar
MultiBinding.cs (1)
186 class ProxyElement : Element
Shadow.cs (1)
6 public class Shadow : Element, IShadow
StyleableElement\StyleableElement.cs (1)
8 public abstract class StyleableElement : Element, IStyleSelectable
SwipeView\SwipeItems.cs (1)
13 public class SwipeItems : Element, IList<ISwipeItem>, INotifyCollectionChanged
Microsoft.Maui.Controls.Maps (2)
MapElement.cs (1)
13 public partial class MapElement : Element
Pin.cs (1)
11 public partial class Pin : Element
604 references to Element
Microsoft.Maui.Controls (592)
Application\Application.cs (2)
493 if (window is Element windowElement) 556 if (window is Element windowElement)
AppThemeBinding.cs (3)
14 public AppThemeProxy(Element parent, AppThemeBinding binding) 24 readonly Element _parent; 74 _appThemeProxy = new AppThemeProxy(bindObj as Element, this);
BindableObjectExtensions.cs (3)
178 if (!(bindable is Element owner)) 181 if (oldValue is Element oldView) 184 if (newValue is Element newView)
Binding.cs (4)
134 var relativeSourceTarget = RelativeSourceTargetOverride ?? bindObj as Element; 135 if (relativeSourceTarget is not Element) 155 async void ApplyRelativeSourceBinding(RelativeBindingSource relativeSource, Element relativeSourceTarget, BindableObject targetObject, BindableProperty targetProperty, SetterSpecificity specificity)
BindingBase.cs (4)
18 WeakReference<Element> _relativeSourceTargetOverride; 82 internal Element RelativeSourceTargetOverride 86 Element element = null; 93 _relativeSourceTargetOverride = new WeakReference<Element>(value);
BindingExpression.cs (11)
29 List<WeakReference<Element>> _ancestryChain; 451 internal void SubscribeToAncestryChanges(List<Element> chain, bool includeBindingContext, bool rootIsSource) 457 _ancestryChain = new List<WeakReference<Element>>(); 460 var elem = chain[i]; 466 _ancestryChain.Add(new WeakReference<Element>(elem)); 477 Element elem; 491 int FindAncestryIndex(Element elem) 495 WeakReference<Element> weak = _ancestryChain[i]; 496 Element chainMember = null; 507 if (!(sender is Element elem) || 531 if (!(sender is Element elem) ||
Border\Border.cs (2)
279 if (oldValue is Element oldElement) 284 if (newValue is Element newElement)
Compatibility\Handlers\iOS\DisposeHelpers.cs (2)
11 foreach (Element child in ((Element)view).Descendants())
Compatibility\Handlers\iOS\VisualElementRenderer.cs (1)
10 where TElement : Element, IView
Compatibility\Handlers\ListView\iOS\CellTableViewCell.cs (1)
50 public Element Element => Cell;
Compatibility\Handlers\ListView\iOS\ContextActionCell.cs (2)
65 Element INativeElementView.Element 396 Element e = _cell;
Compatibility\Handlers\ListView\iOS\ListViewRenderer.cs (6)
460 var footer = ListView.FooterElement; 477 ((Element)_footerRenderer.VirtualView)?.DisposeModalAndChildHandlers(); 499 var header = ListView.HeaderElement; 936 foreach (Element descendant in target.Descendants()) 1512 void PreserveActivityIndicatorState(Element element) 1526 foreach (Element childElement in (element as IElementController).LogicalChildren)
Compatibility\Handlers\ListView\iOS\ViewCellRenderer.cs (1)
48 Element INativeElementView.Element => ViewCell;
Compatibility\Handlers\NavigationPage\iOS\NavigationRenderer.cs (4)
967 static void SetAccessibilityHint(UIBarButtonItem uIBarButtonItem, Element element) 980 static void SetAccessibilityLabel(UIBarButtonItem uIBarButtonItem, Element element) 993 static void SetIsAccessibilityElement(UIBarButtonItem uIBarButtonItem, Element element) 1004 static void SetAccessibilityElementsHidden(UIBarButtonItem uIBarButtonItem, Element element)
Compatibility\Handlers\Shell\iOS\ShellFlyoutContentRenderer.cs (1)
377 void OnElementSelected(Element element)
Compatibility\Handlers\Shell\iOS\ShellPageRendererTracker.cs (1)
272 ((Element)sender).ParentSet -= OnTitleViewParentSet;
Compatibility\Handlers\Shell\iOS\ShellSectionRenderer.cs (4)
57 readonly Dictionary<Element, IShellPageRendererTracker> _trackers = 58 new Dictionary<Element, IShellPageRendererTracker>(); 530 Element ElementForViewController(UIViewController viewController) 741 var element = _self.ElementForViewController(viewController);
Compatibility\Handlers\Shell\iOS\ShellTableViewController.cs (3)
17 Action<Element> _onElementSelected; 20 public ShellTableViewController(IShellContext context, UIContainerView headerView, Action<Element> onElementSelected) : this(context, onElementSelected) 26 public ShellTableViewController(IShellContext context, Action<Element> onElementSelected)
Compatibility\Handlers\Shell\iOS\ShellTableViewSource.cs (13)
15 readonly Action<Element> _onElementSelected; 16 List<List<Element>> _groups; 17 Dictionary<Element, UIContainerCell> _cells; 20 public ShellTableViewSource(IShellContext context, Action<Element> onElementSelected) 28 public List<List<Element>> Groups 42 _cells = new Dictionary<Element, UIContainerCell>(); 63 _cells = new Dictionary<Element, UIContainerCell>(); 68 _cells = new Dictionary<Element, UIContainerCell>(); 72 foreach (var element in group) 100 _cells = new Dictionary<Element, UIContainerCell>(); 108 var context = Groups[section][row]; 147 var context = Groups[section][row]; 214 var element = Groups[section][row];
Compatibility\Handlers\TabbedPage\iOS\TabbedRenderer.cs (1)
306 var child = pages[i];
Compatibility\Handlers\ViewHandlerDelegator.cs (1)
16 where TElement : Element, IView
Compatibility\Handlers\VisualElementRenderer.cs (1)
27 where TElement : Element, IView
Compatibility\INativeElementView.cs (1)
6 Element Element { get; }
Compatibility\iOS\Extensions\AccessibilityExtensions.cs (7)
16 public static void SetAccessibilityProperties(this NativeView nativeViewElement, Element element) 28 public static string SetAccessibilityHint(this NativeView Control, Element Element, string _defaultAccessibilityHint = null) 49 public static string SetAccessibilityLabel(this NativeView Control, Element Element, string _defaultAccessibilityLabel = null) 65 public static string SetAccessibilityHint(this UIBarItem Control, Element Element, string _defaultAccessibilityHint = null) 81 public static string SetAccessibilityLabel(this UIBarItem Control, Element Element, string _defaultAccessibilityLabel = null) 97 public static bool? SetIsAccessibilityElement(this NativeView Control, Element Element, bool? _defaultIsAccessibilityElement = null) 132 public static bool? SetAccessibilityElementsHidden(this NativeView Control, Element Element, bool? _defaultAccessibilityElementsHidden = null)
Configuration.cs (1)
7 where TElement : Element
ContentConverter.cs (1)
112 var parent = presenter?.Parent;
ContentPresenter.cs (3)
45 Element element = LogicalChildrenInternal[i]; 87 internal override void SetChildInheritedBindingContext(Element child, object context) 107 newView.ParentOverride = await TemplateUtilities.FindTemplatedParentAsync((Element)bindable);
ContentView\ContentView.cs (1)
41 internal override void SetChildInheritedBindingContext(Element child, object context)
Device.cs (1)
120 public static double GetNamedSize(NamedSize size, Element targetElement)
DispatcherExtensions.cs (1)
17 bindableObject is Element element &&
DragAndDrop\DragEventArgs.cs (1)
56 public virtual Point? GetPosition(Element? relativeTo) =>
DragAndDrop\DragStartingEventArgs.cs (1)
60 public virtual Point? GetPosition(Element? relativeTo) =>
DragAndDrop\DropEventArgs.cs (1)
59 public virtual Point? GetPosition(Element? relativeTo) =>
Effect.cs (1)
19 public Element Element { get; internal set; }
Element\Element.cs (90)
28 /// <description>An <see cref="Element" /> that occupies an area on the screen, has a visual appearance, and can obtain touch input.</description> 51 internal static readonly ReadOnlyCollection<Element> EmptyChildren = new ReadOnlyCollection<Element>(Array.Empty<Element>()); 54 public static readonly BindableProperty AutomationIdProperty = BindableProperty.Create(nameof(AutomationId), typeof(string), typeof(Element), null); 57 public static readonly BindableProperty ClassIdProperty = BindableProperty.Create(nameof(ClassId), typeof(string), typeof(Element), null); 71 WeakReference<Element> _parentOverride; 75 IReadOnlyList<Element> _logicalChildrenReadonly; 77 IList<Element> _internalChildren; 162 internal IReadOnlyList<Element> LogicalChildrenInternal 171 private protected virtual IList<Element> LogicalChildrenInternalBackingStore 175 _internalChildren ??= new List<Element>(); 182 public ReadOnlyCollection<Element> LogicalChildren => 183 new ReadOnlyCollection<Element>(new TemporaryWrapper(LogicalChildrenInternal)); 186 IReadOnlyList<Element> IElementController.LogicalChildren => LogicalChildrenInternal; 190 _logicalChildrenReadonly ??= new ReadOnlyCollection<Element>(LogicalChildrenInternalBackingStore); 194 /// Inserts an <see cref="Element"/> to the logical children at the specified index. 196 /// <param name="index">The zero-based index at which <see cref="Element"/> should be inserted.</param> 197 /// <param name="element">The <see cref="Element"/> to insert into the logical children.</param> 198 public void InsertLogicalChild(int index, Element element) 212 /// Adds an <see cref="Element"/> to the logical children. 214 /// <param name="element">The <see cref="Element"/> to add to the logical children.</param> 215 public void AddLogicalChild(Element element) 229 /// Removes the first occurrence of a specific <see cref="Element"/> from the logical children. 231 /// <param name="element">The <see cref="Element"/> to remove.</param> 234 /// otherwise, false. This method also returns false if <see cref="Element"/> is not found. 236 public bool RemoveLogicalChild(Element element) 256 /// Removes all child <see cref="Element"/>s. 273 internal bool RemoveLogicalChild(Element element, int index) 283 internal Element ParentOverride 291 if (_parentOverride.TryGetTarget(out var parent)) 299 .CreateLogger<Element>()? 325 _parentOverride = new WeakReference<Element>(value); 335 WeakReference<Element> _realParent; 338 public Element RealParent 346 if (_realParent.TryGetTarget(out var parent)) 354 .CreateLogger<Element>()? 365 _realParent = new WeakReference<Element>(value); 378 /// <summary>Gets or sets the parent <see cref="Element"/> of this element.</summary> 379 /// <value>The <see cref="Element"/> which should be the parent of this element.</value> 381 public Element Parent 387 void SetParent(Element value) 389 Element realParent = RealParent; 409 Application.Current?.FindMauiContext()?.CreateLogger<Element>()?.LogWarning($"{this} is already a child of {element}. Remove {this} from {element} before adding to {value}."); 577 SetChildInheritedBindingContext((Element)child, bc); 592 protected virtual void OnChildAdded(Element child) 601 foreach (Element element in child.Descendants()) 612 protected virtual void OnChildRemoved(Element child, int oldLogicalIndex) 621 foreach (Element element in child.Descendants()) 690 internal IEnumerable<Element> Descendants() => 691 Descendants<Element>(); 694 IEnumerable<Element> IElementController.Descendants() => 695 Descendants<Element>(); 698 where TElement : Element 700 var queue = new Queue<Element>(16); 705 IReadOnlyList<Element> children = queue.Dequeue().LogicalChildrenInternal; 708 Element child = children[i]; 779 if (bindableObject != null && (bindableObject as Element)?.Parent == null) 799 internal virtual void SetChildInheritedBindingContext(Element child, object context) 804 internal IEnumerable<Element> VisibleDescendants() 806 var queue = new Queue<Element>(16); 811 IReadOnlyList<Element> children = queue.Dequeue().LogicalChildrenInternal; 898 var element = this; 908 void OnDescendantAdded(Element child) 914 void OnDescendantRemoved(Element child) 944 private protected virtual void OnParentChangingCore(Element oldParent, Element newParent) 1075 class TemporaryWrapper : IList<Element> 1077 IReadOnlyList<Element> _inner; 1079 public TemporaryWrapper(IReadOnlyList<Element> inner) 1084 Element IList<Element>.this[int index] { get => _inner[index]; set => throw new NotSupportedException(); } 1086 int ICollection<Element>.Count => _inner.Count; 1088 bool ICollection<Element>.IsReadOnly => true; 1090 void ICollection<Element>.Add(Element item) => throw new NotSupportedException(); 1092 void ICollection<Element>.Clear() => throw new NotSupportedException(); 1094 bool ICollection<Element>.Contains(Element item) => _inner.IndexOf(item) != -1; 1096 void ICollection<Element>.CopyTo(Element[] array, int arrayIndex) => throw new NotSupportedException(); 1098 IEnumerator<Element> IEnumerable<Element>.GetEnumerator() => _inner.GetEnumerator(); 1102 int IList<Element>.IndexOf(Element item) => _inner.IndexOf(item); 1104 void IList<Element>.Insert(int index, Element item) => throw new NotSupportedException(); 1106 bool ICollection<Element>.Remove(Element item) => throw new NotSupportedException(); 1108 void IList<Element>.RemoveAt(int index) => throw new NotSupportedException();
Element\Element.iOS.cs (4)
11 public static void MapAutomationPropertiesIsInAccessibleTree(IElementHandler handler, Element element) 33 public static void MapAutomationPropertiesExcludedWithChildren(IElementHandler handler, Element view) 46 if (element is Element e) 52 if (element is Element e)
Element\Element_StyleSheets.cs (1)
49 Element parent = this;
Element\ElementEventArgs.cs (2)
10 public ElementEventArgs(Element element) => Element = element ?? throw new ArgumentNullException(nameof(element)); 13 public Element Element { get; private set; }
ElementCollection.cs (3)
6 internal class ElementCollection<T> : ObservableWrapper<Element, T> where T : Element 8 public ElementCollection(ObservableCollection<Element> list) : base(list)
ElementTemplate.cs (3)
13 Element _parent; 51 Element IElementDefinition.Parent 90 if (item is Element elem)
Hosting\AppHostBuilderExtensions.cs (1)
238 Element.RemapForControls();
IConfigElement.cs (1)
4 public interface IConfigElement<out T> where T : Element
IControlTemplated.cs (2)
10 IList<Element> InternalChildren { get; } 12 Element TemplateRoot { get; set; }
IElementConfiguration.cs (1)
9 public interface IElementConfiguration<out TElement> where TElement : Element
IElementController.cs (3)
27 IReadOnlyList<Element> LogicalChildren { get; } 30 Element RealParent { get; } 34 IEnumerable<Element> Descendants();
IElementDefinition.cs (1)
9 Element Parent { get; set; }
IInputTransparentContainerElement.cs (1)
12 Element Parent { get; }
ILayoutController.cs (1)
8 IReadOnlyList<Element> Children { get; }
ImmutableBrush.cs (2)
25 private protected override void OnParentChangingCore(Element oldParent, Element newParent)
IndicatorView\IndicatorStackLayout.cs (1)
17 protected override void OnChildAdded(Element child)
Interactivity\PlatformBehavior.cs (1)
25 where TView : Element
Internals\PageExtensions.cs (1)
13 Element parent = page;
Internals\PropertyPropagationExtensions.cs (12)
9 internal static void PropagatePropertyChanged(string propertyName, Element element, IEnumerable children) 37 public static void PropagatePropertyChanged(string propertyName, Element target, Element source) 52 internal static void PropagateFlowDirection(Element target, Element source) 75 internal static void SetFlowDirectionFromParent(Element child) 80 internal static void PropagateVisual(Element target, Element source) 96 internal static void SetVisualFromParent(Element child) 101 internal static void PropagateWindow(Element target, Element source) 112 internal static void SetWindowFromParent(Element child)
IPageController.cs (1)
13 ObservableCollection<Element> InternalChildren { get; }
IPanGestureController.cs (4)
6 void SendPan(Element sender, double totalX, double totalY, int gestureId); 8 void SendPanCanceled(Element sender, int gestureId); 10 void SendPanCompleted(Element sender, int gestureId); 12 void SendPanStarted(Element sender, int gestureId);
IPinchGestureController.cs (4)
10 void SendPinch(Element sender, double scale, Point currentScalePoint); 12 void SendPinchCanceled(Element sender); 14 void SendPinchEnded(Element sender); 16 void SendPinchStarted(Element sender, Point intialScalePoint); //TODO: intial should be initial, but this is a breaking ABI change. Consider changing for .NET 8
IPlatformElementConfiguration.cs (1)
7 where TElement : Element
ISwipeGestureController.cs (1)
6 void SendSwipe(Element sender, double totalX, double totalY);
ItemsView.cs (3)
81 var element = newValue as Element; 84 element.Parent = (Element)bindable;
Layout\AndExpandLayoutManager.cs (2)
127 protected override void OnChildAdded(Element child) 132 protected override void OnChildRemoved(Element child, int oldLogicalIndex)
Layout\Grid.cs (1)
328 else if (bindable is Element element && element.Parent is Grid parentGrid)
Layout\Layout.cs (6)
68 if (old is Element oldElement) 75 if (value is Element newElement) 159 if (child is Element element) 176 if (child is Element element) 228 if (child is Element element) 275 if (child is Element element)
LegacyLayouts\AbsoluteLayout.cs (3)
82 protected override void OnChildAdded(Element child) 88 protected override void OnChildRemoved(Element child, int oldLogicalIndex) 313 public AbsoluteElementCollection(ObservableCollection<Element> inner, AbsoluteLayout parent) : base(inner)
LegacyLayouts\Grid.cs (1)
305 public GridElementCollection(ObservableCollection<Element> inner, Grid parent) : base(inner)
LegacyLayouts\GridCalc.cs (4)
499 Element w = grid.InternalChildren[index]; 507 Element w = grid.InternalChildren[index]; 533 Element element = grid.InternalChildren[index]; 558 Element element = grid.InternalChildren[index];
LegacyLayouts\Layout.cs (10)
41 protected override void OnChildAdded(Element child) 51 protected override void OnChildRemoved(Element child, int oldLogicalIndex) 171 private protected override IList<Element> LogicalChildrenInternalBackingStore 174 internal ObservableCollection<Element> InternalChildren { get; } = new ObservableCollection<Element>(); 185 public IReadOnlyList<Element> Children => InternalChildren; 547 IReadOnlyList<Element> children = LogicalChildrenInternal; 606 static int GetElementDepth(Element view) 688 foreach (Element element in VisibleDescendants()) 708 foreach (var child in ((IElementController)this).LogicalChildren)
LegacyLayouts\RelativeLayout.cs (1)
352 public RelativeElementCollection(ObservableCollection<Element> inner, RelativeLayout parent) : base(inner)
ListView\IListViewController.cs (2)
11 Element FooterElement { get; } 12 Element HeaderElement { get; }
ListView\ListView.cs (12)
24 readonly List<Element> _visualChildren = new List<Element>(); 92 Element _headerElement; 93 Element _footerElement; 147 if (Header is Element header) 150 if (Footer is Element footer) 321 public Element FooterElement 328 public Element HeaderElement 658 void OnHeaderOrFooterChanged(ref Element storage, string property, object dataObject, DataTemplate template, bool templateChanged) 674 var view = dataObject as Element; 686 storage = template.CreateContent() as Element;
Menu\MenuBar.cs (2)
100 if (item is Element e) 116 if (item is Element e)
Menu\MenuBarItem.cs (6)
22 LogicalChildrenInternalBackingStore = new CastingList<Element, IMenuElement>(_menus); 45 private protected override IList<Element> LogicalChildrenInternalBackingStore { get; } 64 AddLogicalChild((Element)item); 96 InsertLogicalChild(index, (Element)item); 103 var result = RemoveLogicalChild((Element)item, index); 112 RemoveLogicalChild((Element)item, index);
Menu\MenuBarTracker.cs (2)
11 Element _parent; 18 public MenuBarTracker(Element parent, string handlerProperty)
Menu\MenuFlyout.cs (7)
15 LogicalChildrenInternalBackingStore = new CastingList<Element, IMenuElement>(_menus); 18 private protected override IList<Element> LogicalChildrenInternalBackingStore 40 AddLogicalChild((Element)item); 44 if (item is Element element) 78 InsertLogicalChild(index, (Element)item); 85 var result = RemoveLogicalChild((Element)item, index); 94 RemoveLogicalChild((Element)item, index);
Menu\MenuFlyoutSubItem.cs (4)
33 AddLogicalChild((Element)item); 66 InsertLogicalChild(index, (Element)item); 76 var result = RemoveLogicalChild((Element)item); 88 RemoveLogicalChild((Element)item);
MergedStyle.cs (3)
19 typeof(VisualElement), typeof(NavigableElement), typeof(Element) }; 73 var classStyleProperty = BindableProperty.Create("ClassStyle", typeof(IList<Style>), typeof(Element), default(IList<Style>), 80 if (Target is Element targetelement)
MultiBinding.cs (2)
149 _proxyObject = new ProxyElement() { Parent = targetObject as Element }; 160 binding.RelativeSourceTargetOverride = targetObject as Element;
MultiPage.cs (5)
128 protected override void OnChildAdded(Element child) 253 Element element = InternalChildren[e.OldStartingIndex]; 306 Element element = InternalChildren[i]; 329 List<Element> snapshot = InternalChildren.ToList(); 333 foreach (Element element in snapshot)
NameScopeExtensions.cs (1)
10 public static T FindByName<T>(this Element element, string name)
NavigableElement\NavigableElement.cs (3)
9 /// <summary>Represents an <see cref="Element"/> with base functionality for <see cref="Page"/> navigation. Does not necessarily render on screen.</summary> 51 /// <seealso cref="Element.OnParentSet"/> 56 Element parent = Parent;
NavigationPage\NavigationPage.cs (8)
402 void RemoveFromInnerChildren(Element page) 482 var element = (Element)newStack[i]; 528 var rootPage = this.FindParentWith(x => (x is IWindow te || Window.Navigation.ModalStack.Contains(x)), true); 583 Element toolbarRoot; 723 readonly Lazy<ReadOnlyCastingList<Page, Element>> _castingList; 728 _castingList = new Lazy<ReadOnlyCastingList<Page, Element>>(() => new ReadOnlyCastingList<Page, Element>(Owner.InternalChildren));
NavigationPage\NavigationPage.Legacy.cs (5)
157 Element[] childrenToRemove = InternalChildren.Skip(1).ToArray(); 158 foreach (Element child in childrenToRemove) 258 readonly Lazy<ReadOnlyCastingList<Page, Element>> _castingList; 263 _castingList = new Lazy<ReadOnlyCastingList<Page, Element>>(() => new ReadOnlyCastingList<Page, Element>(Owner.InternalChildren));
ObservableWrapper.cs (1)
10 internal class ObservableWrapper<TTrack, TRestrict> : IList<TRestrict>, IList, INotifyCollectionChanged where TTrack : Element where TRestrict : TTrack
Page\Page.cs (14)
207 public ObservableCollection<Element> InternalChildren { get; } = new ObservableCollection<Element>(); 430 IList<Element> elements = this.InternalChildren; 431 foreach (Element element in elements) 511 /// Indicates that the preferred size of a child <see cref="Element"/> has changed. 543 /// Called when the page's <see cref="Element.Parent"/> property has changed. 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> 571 /// Requests that the child <see cref="Element"/>s of the page update their layouts. 581 foreach (Element el in logicalChildren) 596 var element = logicalChildren[i]; 722 Application FindApplication(Element element) 736 var item = (Element)e.OldItems[i]; 745 foreach (Element item in e.NewItems)
PanGestureRecognizer.cs (4)
24 void IPanGestureController.SendPan(Element sender, double totalX, double totalY, int gestureId) 29 void IPanGestureController.SendPanCanceled(Element sender, int gestureId) 34 void IPanGestureController.SendPanCompleted(Element sender, int gestureId) 39 void IPanGestureController.SendPanStarted(Element sender, int gestureId)
ParentChangingEventArgs.cs (4)
10 public Element NewParent { get; } 11 public Element OldParent { get; } 13 public ParentChangingEventArgs(Element oldParent, Element newParent)
PinchGestureRecognizer.cs (4)
14 void IPinchGestureController.SendPinch(Element sender, double delta, Point currentScalePoint) 25 void IPinchGestureController.SendPinchCanceled(Element sender) 36 void IPinchGestureController.SendPinchEnded(Element sender) 47 void IPinchGestureController.SendPinchStarted(Element sender, Point initialScalePoint)
Platform\GestureManager\GesturePlatformManager.iOS.cs (1)
68 (_handler.VirtualView as Element)?.GetCompositeGestureRecognizers() as ObservableCollection<IGestureRecognizer>;
Platform\iOS\Extensions\FontExtensions.cs (1)
20 public static UIFont ToUIFont<TFontElement>(this TFontElement fontElement) where TFontElement : Element, IFontElement
Platform\PlatformConfigurationExtensions.cs (1)
21 where T : Element, IElementConfiguration<T>
PlatformConfiguration\TizenSpecific\Application.cs (7)
68 public static readonly BindablePropertyKey ActiveBezelInteractionElementPropertyKey = BindableProperty.CreateAttachedReadOnly("ActiveBezelInteractionElement", typeof(Element), typeof(FormsElement), default(Element)); 71 public static Element GetActiveBezelInteractionElement(BindableObject application) 73 return (Element)application.GetValue(ActiveBezelInteractionElementPropertyKey.BindableProperty); 78 public static void SetActiveBezelInteractionElement(BindableObject application, Element value) 84 public static Element GetActiveBezelInteractionElement(this IPlatformElementConfiguration<Tizen, FormsElement> config) 91 public static IPlatformElementConfiguration<Tizen, FormsElement> SetActiveBezelInteractionElement(this IPlatformElementConfiguration<Tizen, FormsElement> config, Element value)
PlatformConfigurationRegistry.cs (1)
9 where TElement : Element
PointerEventArgs.cs (2)
39 /// <returns>The position relative to the <see cref="Element"/>.</returns> 40 public virtual Point? GetPosition(Element? relativeTo) =>
Properties\AssemblyInfo.cs (10)
165[assembly: StyleProperty("-maui-shell-background", typeof(Element), nameof(Shell.BackgroundColorProperty), PropertyOwnerType = typeof(Shell))] 166[assembly: StyleProperty("-maui-shell-disabled", typeof(Element), nameof(Shell.DisabledColorProperty), PropertyOwnerType = typeof(Shell))] 167[assembly: StyleProperty("-maui-shell-foreground", typeof(Element), nameof(Shell.ForegroundColorProperty), PropertyOwnerType = typeof(Shell))] 168[assembly: StyleProperty("-maui-shell-tabbar-background", typeof(Element), nameof(Shell.TabBarBackgroundColorProperty), PropertyOwnerType = typeof(Shell))] 169[assembly: StyleProperty("-maui-shell-tabbar-disabled", typeof(Element), nameof(Shell.TabBarDisabledColorProperty), PropertyOwnerType = typeof(Shell))] 170[assembly: StyleProperty("-maui-shell-tabbar-foreground", typeof(Element), nameof(Shell.TabBarForegroundColorProperty), PropertyOwnerType = typeof(Shell))] 171[assembly: StyleProperty("-maui-shell-tabbar-title", typeof(Element), nameof(Shell.TabBarTitleColorProperty), PropertyOwnerType = typeof(Shell))] 172[assembly: StyleProperty("-maui-shell-tabbar-unselected", typeof(Element), nameof(Shell.TabBarUnselectedColorProperty), PropertyOwnerType = typeof(Shell))] 173[assembly: StyleProperty("-maui-shell-title", typeof(Element), nameof(Shell.TitleColorProperty), PropertyOwnerType = typeof(Shell))] 174[assembly: StyleProperty("-maui-shell-unselected", typeof(Element), nameof(Shell.UnselectedColorProperty), PropertyOwnerType = typeof(Shell))]
RadioButton\RadioButton.cs (3)
398 MessagingCenter.Subscribe<Element, RadioButtonGroupValueChanged>(this, 410 MessagingCenter.Unsubscribe<Element, RadioButtonGroupValueChanged>(this, RadioButtonGroup.GroupValueChangedMessage); 431 void HandleRadioButtonGroupValueChanged(Element layout, RadioButtonGroupValueChanged args)
RadioButton\RadioButtonGroup.cs (6)
59 Element scope = string.IsNullOrEmpty(groupName) 69 internal static Element GroupByParent(RadioButton radioButton) 71 Element parent = radioButton.Parent; 101 internal static Element GetVisualRoot(Element element) 103 Element parent = element.Parent;
RadioButton\RadioButtonGroupController.cs (7)
8 readonly Element _layout; 22 _layout = (Element)layout; 88 foreach (var element in e.Element.Descendants()) 113 void UpdateGroupName(Element element, string name, string oldName = null) 128 void UpdateGroupNames(Element element, string name, string oldName = null) 130 foreach (Element descendant in element.Descendants()) 143 MessagingCenter.Send<Element, RadioButtonGroupValueChanged>(_layout, RadioButtonGroup.GroupValueChangedMessage,
RadioButton\RadioButtonGroupSelectionChanged.cs (6)
6 public Element Scope { get; } 8 protected RadioButtonScopeMessage(Element scope) => Scope = scope; 15 public RadioButtonGroupSelectionChanged(Element scope, object value) : base(scope) 25 public RadioButtonGroupNameChanged(Element scope, string oldName) : base(scope) 33 public RadioButtonValueChanged(Element scope) : base(scope) { } 41 public RadioButtonGroupValueChanged(string groupName, Element scope, object value) : base(scope)
Registrar.cs (2)
210 while (viewType != null && viewType != typeof(Element)) 234 while (viewType != null && viewType != typeof(Element))
RelativeBindingSource.cs (10)
74 internal async Task Apply(BindingExpression expression, Element relativeSourceTarget, BindableObject targetObject, BindableProperty targetProperty, SetterSpecificity specificity) 80 internal async Task Apply(TypedBindingBase binding, Element relativeSourceTarget, BindableObject targetObject, BindableProperty targetProperty, SetterSpecificity specificity) 86 private async Task Apply(IBindingAdapter bindingAdapter, Element relativeSourceTarget) 104 chain: new List<Element> { relativeSourceTarget }, 117 Element currentElement, 119 List<Element> chain, 162 private bool ElementFitsAncestorTypeAndLevel(Element element, ref int level, ref object? lastPotentialBctx) 196 void SubscribeToAncestryChanges(List<Element> chain, bool includeBindingContext, bool rootIsSource); 212 public void SubscribeToAncestryChanges(List<Element> chain, bool includeBindingContext, bool rootIsSource) 229 public void SubscribeToAncestryChanges(List<Element> chain, bool includeBindingContext, bool rootIsSource)
RouteFactory.cs (2)
10 public abstract Element GetOrCreate(); 11 public abstract Element GetOrCreate(IServiceProvider services);
Routing.cs (9)
157 public static Element GetOrCreateContent(string route, IServiceProvider services = null) 160 Element result = null; 182 internal static string GetRoutePathIfNotImplicit(Element obj) 233 public static void SetRoute(Element obj, string value) 270 public override Element GetOrCreate() 272 return (Element)Activator.CreateInstance(_type); 275 public override Element GetOrCreate(IServiceProvider services) 279 return (Element)Extensions.DependencyInjection.ActivatorUtilities.GetServiceOrCreateInstance(services, _type); 282 return (Element)Activator.CreateInstance(_type);
ScrollToRequestedEventArgs.cs (2)
17 internal ScrollToRequestedEventArgs(Element element, ScrollToPosition position, bool shouldAnimate) 43 public Element Element { get; private set; }
ScrollView\ScrollView.cs (3)
256 public Task ScrollToAsync(Element element, ScrollToPosition position, bool animated) 346 bool CheckElementBelongsToScrollViewer(Element element) 360 double GetCoordinate(Element item, string coordinateName, double coordinate)
Setter.cs (2)
71 if (!string.IsNullOrEmpty(TargetName) && target is Element element) 95 if (!string.IsNullOrEmpty(TargetName) && target is Element element)
Shell\BaseShellItem.cs (7)
27 protected private ObservableCollection<Element> DeclaredChildren { get; } = new ObservableCollection<Element>(); 68 foreach (Element element in args.NewItems) 72 foreach (Element element in args.OldItems) 247 internal static void PropagateFromParent(BindableProperty property, Element me) 438 BindingBase automationIdBinding = Binding.Create(static (Element element) => element.AutomationId); 439 defaultGridClass.Setters.Add(new Setter { Property = Element.AutomationIdProperty, Value = automationIdBinding });
Shell\IShellController.cs (5)
33 void AddAppearanceObserver(IAppearanceObserver observer, Element pivot); 37 void AppearanceChanged(Element source, bool appearanceSet); 39 List<List<Element>> GenerateFlyoutGrouping(); 43 void OnFlyoutItemSelected(Element element); 45 Task OnFlyoutItemSelectedAsync(Element element);
Shell\Shell.cs (28)
120 if (bindable is Element element) 345 var element = (Element)bindable; 610 var item = (Element)bindable; 611 var source = item; 630 List<(IAppearanceObserver Observer, Element Pivot)> _appearanceObservers = new List<(IAppearanceObserver Observer, Element Pivot)>(); 685 void IShellController.AddAppearanceObserver(IAppearanceObserver observer, Element pivot) 703 void UpdateToolbarAppearanceFeatures(Element pivot, ShellAppearance appearance) 739 void IShellController.AppearanceChanged(Element source, bool appearanceSet) 761 var pivot = Pivot; 763 Element target; 764 Element leaf; 794 void OnFlyoutItemSelected(Element element, bool platformInitiated) => 797 void IShellController.OnFlyoutItemSelected(Element element) => 800 Task IShellController.OnFlyoutItemSelectedAsync(Element element) => 803 Task OnFlyoutItemSelectedAsync(Element element, bool platformInitiated) 1506 List<List<Element>> IShellController.GenerateFlyoutGrouping() => 1559 bool ValidDefaultShellItem(Element child) => !(child is MenuShellItem); 1682 static void UpdateChecked(Element root, bool isChecked = true) 1791 Action<Element> observer, 1792 Element element = null, 1795 element = element ?? (Element)GetCurrentShellPage() ?? CurrentContent; 1819 ShellAppearance GetAppearanceForPivot(Element pivot) 1917 internal Element GetVisiblePage() 1949 Element WalkToPage(Element element)
Shell\ShellAppearance.cs (1)
145 public bool Ingest(Element pivot)
Shell\ShellContent.cs (5)
165 protected override void OnChildAdded(Element child) 175 protected override void OnChildRemoved(Element child, int oldLogicalIndex) 328 foreach (Element el in e.NewItems) 334 var el = (Element)e.OldItems[i];
Shell\ShellFlyoutItemsManager.cs (11)
12 List<List<Element>> _lastGeneratedFlyoutItems; 15 ReadOnlyObservableCollectionWithSource<IReadOnlyList<Element>> _flyoutItemsReadonly; 21 _flyoutItemsReadonly = new ReadOnlyObservableCollectionWithSource<IReadOnlyList<Element>>(); 31 flyoutItems.Add(new ReadOnlyObservableCollectionWithSource<Element>()); 39 var dest = ((ReadOnlyObservableCollectionWithSource<Element>)flyoutItems[i]).List; 43 var item = dest[j]; 50 var item = source[j]; 83 public List<List<Element>> GenerateFlyoutGrouping() 101 var result = new List<List<Element>>(); 103 var currentGroup = new List<Element>(); 230 currentGroup = new List<Element>();
Shell\ShellGroupItem.cs (1)
15 ((Element)bindable).FindParentOfType<Shell>()?.SendFlyoutItemsChanged();
Shell\ShellItem.cs (9)
158 foreach (Element item in args.OldItems) 166 foreach (Element item in args.NewItems) 251 protected override void OnChildAdded(Element child) 257 protected override void OnChildRemoved(Element child, int oldLogicalIndex) 263 void OnVisibleChildAdded(Element child) 269 void OnVisibleChildRemoved(Element child) 311 foreach (Element element in e.NewItems) 319 var element = (Element)e.OldItems[i];
Shell\ShellNavigationManager.cs (3)
282 public static void ApplyQueryAttributes(Element element, ShellRouteParameters query, bool isLastItem, bool isPopping) 300 if (element is ShellContent shellcontent && shellcontent.Content is Element e) 316 ShellRouteParameters MergeData(Element shellElement, ShellRouteParameters data, bool isPopping)
Shell\ShellSection.cs (6)
223 foreach (Element item in args.OldItems) 231 foreach (Element item in args.NewItems) 669 protected override void OnChildAdded(Element child) 675 protected override void OnChildRemoved(Element child, int oldLogicalIndex) 694 void OnVisibleChildAdded(Element child) 703 void OnVisibleChildRemoved(Element child)
Shell\ShellTemplatedViewManager.cs (6)
14 Action<Element> OnChildRemoved, 15 Action<Element> OnChildAdded) 32 Action<Element> OnChildRemoved, 33 Action<Element> OnChildAdded) 48 Action<Element> OnChildRemoved, 49 Action<Element> OnChildAdded,
Style.cs (1)
134 } while (targetType != typeof(Element));
StyleableElement\StyleableElement.cs (1)
7 /// <summary>Represents an <see cref="Element"/> with base functionality for styling. Does not necessarily render on screen.</summary>
StyleSheets\StyleSheet.cs (2)
99 if (!(bindable is Element styleable)) 104 void Apply(Element styleable)
SwipeGestureRecognizer.cs (1)
57 void ISwipeGestureController.SendSwipe(Element sender, double totalX, double totalY)
SwipeView\SwipeItems.cs (5)
21 if (item is Element e) 80 if (item is Element e) 134 if (item is Element e) 144 if (item is Element e) 160 void CheckParent(Element e)
SwipeView\SwipeView.cs (3)
113 foreach (var item in InternalChildren) 266 protected override void OnChildAdded(Element child) 272 protected override void OnChildRemoved(Element child, int oldLogicalIndex)
TappedEventArgs.cs (1)
27 public virtual Point? GetPosition(Element? relativeTo) =>
TemplateBinding.cs (4)
90 var view = bindObj as Element; 96 Element templatedParent = await TemplateUtilities.FindTemplatedParentAsync(view); 134 void ApplyInner(Element templatedParent, BindableObject bindableObject, BindableProperty targetProperty)
TemplatedPage.cs (4)
22 IList<Element> IControlTemplated.InternalChildren => InternalChildren; 24 Element IControlTemplated.TemplateRoot { get; set; } 40 internal override void SetChildInheritedBindingContext(Element child, object context) 64 protected override void OnChildRemoved(Element child, int oldLogicalIndex)
TemplatedView\TemplatedView.cs (5)
26 IList<Element> IControlTemplated.InternalChildren => InternalChildren; 28 Element IControlTemplated.TemplateRoot { get; set; } 35 Element element = LogicalChildrenInternal[i]; 78 internal override void SetChildInheritedBindingContext(Element child, object context) 105 protected override void OnChildRemoved(Element child, int oldLogicalIndex)
TemplateUtilities.cs (14)
11 public static async Task<Element> FindTemplatedParentAsync(Element element) 35 public static Task<Element> GetRealParentAsync(Element element) 37 Element parent = element.RealParent; 39 return Task.FromResult<Element>(null); 44 var tcs = new TaskCompletionSource<Element>(); 59 var newElement = (Element)newValue; 87 var queue = new Queue<Element>(16); 88 queue.Enqueue((Element)self); 92 IReadOnlyList<Element> children = queue.Dequeue().LogicalChildrenInternal; 95 Element child = children[i]; 139 internal static void OnChildRemoved(IControlTemplated controlTemplated, Element removedChild)
TypedBinding.cs (16)
71 internal abstract void SubscribeToAncestryChanges(List<Element> chain, bool includeBindingContext, bool rootIsSource); 147 List<WeakReference<Element>> _ancestryChain; 185 var relativeSourceTarget = RelativeSourceTargetOverride ?? bindObj as Element; 186 if (relativeSourceTarget is not Element) 205 RelativeBindingSource relativeSource, Element relativeSourceTarget, BindableObject targetObject, BindableProperty targetProperty, SetterSpecificity specificity) 346 internal override void SubscribeToAncestryChanges(List<Element> chain, bool includeBindingContext, bool rootIsSource) 352 _ancestryChain = new List<WeakReference<Element>>(); 355 var elem = chain[i]; 361 _ancestryChain.Add(new WeakReference<Element>(elem)); 372 Element elem; 386 int FindAncestryIndex(Element elem) 390 WeakReference<Element> weak = _ancestryChain[i]; 391 Element chainMember = null; 402 if (!(sender is Element elem)) 425 if (!(sender is Element elem))
ViewExtensions.cs (19)
292 if (animatable is Element element) 304 internal static IMauiContext RequireMauiContext(this Element element, bool fallbackToAppMauiContext = false) 307 internal static IMauiContext? FindMauiContext(this Element element, bool fallbackToAppMauiContext = false) 312 foreach (var parent in element.GetParentsPath()) 321 internal static ILogger<T>? CreateLogger<T>(this Element element, bool fallbackToAppMauiContext = true) => 324 internal static IFontManager RequireFontManager(this Element element, bool fallbackToAppMauiContext = false) 327 internal static double GetDefaultFontSize(this Element element) 330 internal static Element? FindParentWith(this Element element, Func<Element, bool> withMatch, bool includeThis = false) 335 foreach (var parent in element.GetParentsPath()) 344 internal static T? FindParentOfType<T>(this Element element, bool includeThis = false) 350 foreach (var parent in element.GetParentsPath()) 359 internal static IList<IGestureRecognizer>? GetCompositeGestureRecognizers(this Element element) 367 internal static IEnumerable<Element> GetParentsPath(this Element self) 369 Element current = self; 416 internal static bool TrySetValue(this Element element, string text) 503 internal static IMauiContext? GetCurrentlyPresentedMauiContext(this Element element)
VisualElement\VisualElement.cs (4)
16 /// An <see cref="Element" /> that occupies an area on the screen, has a visual appearance, and can obtain touch input. 963 Element parent = RealParent; 1271 protected override void OnChildAdded(Element child) 1286 protected override void OnChildRemoved(Element child, int oldLogicalIndex)
VisualElement\VisualElementChangedEventArgs.cs (1)
12 public class ElementChangedEventArgs<TElement> : EventArgs where TElement : Element
Window\Window.cs (1)
384 (Element)bindable,
Microsoft.Maui.Controls.Build.Tasks (1)
SetNamescopesAndRegisterNamesVisitor.cs (1)
72 Context.IL.Emit(OpCodes.Stfld, module.ImportFieldReference(Context.Cache, parameterTypes[0], nameof(Element.transientNamescope)));
Microsoft.Maui.Controls.Compatibility (6)
Tizen\Extensions\PlatformConfigurationExtensions.cs (1)
8 where T : Element, IElementConfiguration<T>
Tizen\Renderers\NavigationPageRenderer.cs (1)
112 foreach (var child in (Element as IPageController).InternalChildren)
Tizen\Renderers\VisualElementRenderer.cs (3)
189 foreach (Element child in logicalChildren) 278 foreach (var child in logicalChildren) 623 protected virtual void AddChild(Element child)
Tizen\StaticRegistrar.cs (1)
36 while (viewType != null && viewType != typeof(Element))
Microsoft.Maui.Controls.Xaml (5)
CreateValuesVisitor.cs (1)
167 if (value is Element iElement)
MarkupExtensions\RelativeSourceExtension.cs (1)
45 actualMode = typeof(Element).IsAssignableFrom(AncestorType)
RegisterXNamesVisitor.cs (1)
55 if (Values[parentNode] is Element element)
XamlLoader.cs (2)
89 VisualDiagnostics.OnChildAdded(null, view as Element); 134 VisualDiagnostics.OnChildAdded(null, inflatedView as Element);