Element Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides the base class for all Microsoft.Maui.Controls hierarchal elements. This class contains all the methods and properties required to represent an element in the Microsoft.Maui.Controls hierarchy.
public ref class Element abstract : Microsoft::Maui::Controls::BindableObject, Microsoft::Maui::Controls::IEffectControlProvider, Microsoft::Maui::Controls::IElementController, Microsoft::Maui::Controls::Internals::INameScope, Microsoft::Maui::IElement, Microsoft::Maui::IVisualTreeElement
public ref class Element abstract : Microsoft::Maui::Controls::BindableObject, Microsoft::Maui::Controls::IEffectControlProvider, Microsoft::Maui::Controls::IElementController, Microsoft::Maui::Controls::Internals::INameScope, Microsoft::Maui::IContextFlyoutElement, Microsoft::Maui::IElement, Microsoft::Maui::IToolTipElement, Microsoft::Maui::IVisualTreeElement
public abstract class Element : Microsoft.Maui.Controls.BindableObject, Microsoft.Maui.Controls.IEffectControlProvider, Microsoft.Maui.Controls.IElementController, Microsoft.Maui.Controls.Internals.INameScope, Microsoft.Maui.IElement, Microsoft.Maui.IVisualTreeElement
public abstract class Element : Microsoft.Maui.Controls.BindableObject, Microsoft.Maui.Controls.IEffectControlProvider, Microsoft.Maui.Controls.IElementController, Microsoft.Maui.Controls.Internals.INameScope, Microsoft.Maui.IContextFlyoutElement, Microsoft.Maui.IElement, Microsoft.Maui.IToolTipElement, Microsoft.Maui.IVisualTreeElement
type Element = class
inherit BindableObject
interface INameScope
interface IElementController
interface IVisualTreeElement
interface IElement
interface IEffectControlProvider
type Element = class
inherit BindableObject
interface INameScope
interface IElementController
interface IVisualTreeElement
interface IElement
interface IEffectControlProvider
interface IToolTipElement
interface IContextFlyoutElement
Public MustInherit Class Element
Inherits BindableObject
Implements IEffectControlProvider, IElement, IElementController, INameScope, IVisualTreeElement
Public MustInherit Class Element
Inherits BindableObject
Implements IContextFlyoutElement, IEffectControlProvider, IElement, IElementController, INameScope, IToolTipElement, IVisualTreeElement
- Inheritance
- Derived
- Implements
Remarks
Important categories of visual elements are noted in the following table:
| Class | Description |
|---|---|
| VisualElement | A Element that occupies an area on the screen, has a visual appearance, and can obtain touch input. |
| Cell | Cells are elements meant to be added to ListView or TableView. |
| Page | A VisualElement that occupies most or all of the screen and contains a single child. |
| Layout | Layout have a single child of type View, while subclasses of Layout have a collection of multiple children views, including other layouts. |
| Controls and specialized Views | The lower part of the diagram shows the Microsoft.Maui.Controls classes for universally-available controls, such as Buttons and TableViews. |
Constructors
| Element() |
Fields
| AutomationIdProperty |
The backing store for the AutomationId field. |
| ClassIdProperty |
Identifies the ClassId bindable property. |
| ControlsElementMapper | |
Properties
| AutomationId |
Gets or sets a value that allows the automation framework to find and interact with this element. |
| BindingContext |
Gets or sets object that contains the properties that will be targeted by the bound properties that belong to this BindableObject. (Inherited from BindableObject) |
| ClassId |
Gets or sets a value used to identify a collection of semantically similar elements. |
| Dispatcher | (Inherited from BindableObject) |
| EffectControlProvider |
For internal use by the Microsoft.Maui.Controls platform. |
| Effects |
A list of the effects that are applied to this item. |
| Handler | |
| Id |
Gets a value that can be used to uniquely identify an element through the run of an application. |
| LogicalChildren |
Obsolete.
For internal use by the Microsoft.Maui.Controls platform. |
| Parent |
Gets or sets the parent element of the element. |
| RealParent |
For internal use by the Microsoft.Maui.Controls platform. |
| StyleId |
Gets or sets a user defined value to uniquely identify the element. |
Methods
Events
| BindingContextChanged | (Inherited from BindableObject) |
| ChildAdded | |
| ChildRemoved | |
| DescendantAdded | |
| DescendantRemoved | |
| HandlerChanged | |
| HandlerChanging | |
| ParentChanged | |
| ParentChanging | |
| PropertyChanged | (Inherited from BindableObject) |
| PropertyChanging | (Inherited from BindableObject) |