Table of Contents

Class FrameworkElement

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

Base class for components that can be loaded from uixml.

public class FrameworkElement : DisposableObject, IBaseObjectWithAttr, IBaseObjectWithId, INotifyPropertyChanged, IDisposableObject, IBaseObject, IComponent, IDisposable
Inheritance
FrameworkElement
Implements
Derived

Properties

AutomationId

Gets or sets the unique identifier that allows the automation framework to find and interact with this element. This value may only be set once on an element.

ContentElements

Returns a collection of content elements which is used by the UIXML loader to find content items by index.

DataContext

Gets or sets data context to use in the element. Only some elements use this property.

IsRoot

Gets a value indicating whether this instance is the root element.

LogicalChildrenCollection

Returns a collection of elements which can be treated as "logical children" of this element.

LogicalParent

Gets logical parent.

LogicalParents

Gets an enumerable collection of all parent elements in the visual tree, starting from the immediate parent and traversing upward.

LogicalRoot

Gets the logical root of the element tree to which this element belongs. If this element is the root, it returns itself.

LogicalTopParent

Gets the topmost logical parent in the hierarchy of this element.

Name

Gets or sets the identifying name of the object. The name provides a reference so that code-behind, such as event handler code, can refer to a markup object after it is constructed during processing by a UIXML processor.

Site

Gets or sets the ISite associated with the object.

Methods

DisposeManaged()

Override to dispose managed resources. Here we dispose all used object references.

FindElement(string)

Recursively searches all child elements for an element with the specified name, and throws an exception if the requested element is not found.

OnDataContextChanged(object?, object?)

Called when the DataContext property changes.

OnNameChanged()

Called when the Name property changes.

RaiseDataContextChanged(object?, object?)

Raises the OnDataContextChanged(object?, object?) method and DataContextChanged event.

RaiseNameChanged()

Raises the OnNameChanged() method and NameChanged event.

SetDataContext(object?)

Same as setting DataContext property.

TryFindElement(string?)

Recursively searches all child elements for an element with the specified name, and returns that element if found.

Events

DataContextChanged

Occurs when the DataContext property changes.

NameChanged

Occurs when the Name property changes.