IXRFrameworkElement (Compact 2013)
3/28/2014
This class represents a UI element that can be located in the element tree that belongs to a visual host.
Syntax
class IXRFrameworkElement : public IXRUIElement
Inheritance Hierarchy
IXRFrameworkElement
Methods
Method |
Description |
---|---|
Attaches a delegate to the LayoutUpdated event for this framework element. |
|
Attaches a delegate to the Loaded event for this framework element. |
|
Attaches a delegate to the SizeChanged event for this framework element. |
|
Loads the relevant control template so that its parts can be referenced. |
|
Retrieves the element that has the specified name. |
|
Retrieves the displayed height of this framework element. |
|
Retrieves the displayed width of this framework element. |
|
Retrieves the actual x-coordinate of this UI element, in pixels. |
|
Retrieves the actual y-coordinate of this UI element, in pixels. |
|
Retrieves the cursor that is displayed while the mouse pointer is over this framework element. |
|
Retrieves the data-source object that provides the data context for an element that participates in data binding. |
|
Retrieves the direction that text and other UI elements flow within any parent element that controls their layout. |
|
Retrieves the height of this framework element. |
|
Retrieves the characteristics that determine the horizontal alignment of this framework element when it is displayed inside a parent element, such as a panel or items control. |
|
Retrieves information about the width of the frame that surrounds this framework element. |
|
Retrieves the maximum height of this framework element. |
|
Retrieves the maximum width of this framework element. |
|
Retrieves the minimum height of this framework element. |
|
Retrieves the minimum width of this framework element. |
|
Returns the parent object of this object in the visual tree. |
|
Retrieves the locally defined resource dictionary. |
|
Retrieves an IXRStyle instance that is applied to this framework element when it is displayed. |
|
Retrieves an arbitrary string value that you can use to store custom information about this framework element. |
|
Retrieves the collection of triggers that initiate different kinds of animations for this element. |
|
Retrieves the characteristics that determine the vertical alignment of this framework element when it is displayed inside a parent element, such as a panel or items control. |
|
Retrieves the width of this framework element. |
|
Removes a delegate from the LayoutUpdated event for this framework element. |
|
Removes a delegate from the Loaded event for this framework element. |
|
Removes a delegate from the SizeChanged event for this framework element. |
|
Attaches a data binding to an IXRFrameworkElement object, using the provided binding object. |
|
Sets the cursor that is displayed while the mouse pointer is over this framework element. |
|
Sets the data-source object that provides the data context for an element that participates in data binding. |
|
Sets the direction that text and other UI elements flow within any parent element that controls their layout. |
|
Sets the height of this framework element. |
|
Sets the characteristics that determine the horizontal alignment of this framework element when it is displayed inside a parent element, such as a panel or items control. |
|
Sets the width of the frame that surrounds this framework element. |
|
Sets the maximum height of this framework element. |
|
Sets the maximum width of this framework element. |
|
Sets the minimum height of this framework element. |
|
Sets the minimum width of this framework element. |
|
Sets an IXRStyle instance that is applied to this framework element when it is displayed. |
|
Sets an arbitrary string value that you can use to store custom information about this framework element. |
|
Sets the characteristics that determine the vertical alignment of this framework element when it is displayed inside a parent element, such as a panel or items control. |
|
Sets the new width of this framework element. |
Thread Safety
Members of this class are thread-safe if you previously called IXRApplication::CreateHostFromXaml and supplied it with an XRWindowCreateParams structure that has AllowsMultipleThreadAccess set to true.
Remarks
IXRFrameworkElement provides a framework of common APIs for creating or changing elements that comply with the XAML for Windows Embedded layout system, enabling the layout system to arrange them on the screen at run time.
IXRFrameworkElement extends IXRUIElement and adds the following capabilities:
- Layout XAML for Windows Embedded implements its layout system to recognize elements that derive from IXRFrameworkElement. It also reads several different properties that are defined at that level, such as the MinWidth property that IXRFrameworkElement::GetMinWidth retrieves. It provides extensible methods for layout behavior that both panel objects and controls can override in their class implementations.
- Object-lifetime events It is frequently useful to know when the element is first loaded-when it is attached to an element tree that connects to the root of the visual tree. You can attach delegates to the Loaded event, providing useful hooks for C++ code-behind operations, such as adding child elements or setting properties on child elements just before they are used.
Many common classes in XAML for Windows Embedded derive from IXRFrameworkElement, either directly or through intermediate base classes such as IXRPanel or IXRControl.
To position an object derived from IXRFrameworkElement on the screen, you can specify its offsets by calling IXRFrameworkElement::SetMargin. Or, you can set its attached properties Canvas.Left and Canvas.Top by calling IXRDependencyObject::SetAttachedProperty(const WCHAR*, const WCHAR*, float).
The element tree provides access to IXRFrameworkElement objects. The visual host provides access to the root of the element tree. After you create a visual host for your application, you can retrieve an IXRFrameworkElement pointer to its root element by calling IXRVisualHost::GetRootElement.
IXRFrameworkElement provides support for several basic scenarios, but lacks some extended features that are desirable for creating UI in XAML. Many of these aspects are instead present on IXRControl or other immediate subclasses of IXRFrameworkElement.
If you find you need to create a class instance, use an IXRFrameworkElementPtr smart pointer instead of a raw interface pointer. For more information, see XRPtr<Interface>.
.NET Framework Equivalent
System.Windows.FrameworkElement
Requirements
Header |
XamlRuntime.h |
sysgen |
SYSGEN_XAML_RUNTIME |