IXRFrameworkElement (Windows Embedded CE 6.0)
1/6/2010
This class represents a UI element located in the element tree that belongs to a visual host. It provides a framework of common APIs for creating or changing elements that comply with Silverlight for Windows Embedded layout system, enabling the layout system to arrange them on the screen at run time.
Syntax
class IXRFrameworkElement : public IXRUIElement
Methods
Method | Description |
---|---|
Attaches a delegate to the Loaded event for this framework element. When this framework element raises the Loaded event, this delegate will be invoked. |
|
Attaches a delegate to the SizeChanged event for this framework element. When the SizeChanged event is raised by this framework element, this delegate will be invoked. |
|
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 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 can be used 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 Loaded event for this framework element. |
|
Removes a delegate from the SizeChanged event for this framework element. |
|
Sets the cursor that is displayed while the mouse pointer is over this framework element. |
|
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 can be used 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 characteristics that determine the vertical alignment of this framework element when it is displayed in a parent element, such as a panel or items control. |
Remarks
IXRFrameworkElement extends IXRUIElement and adds the following capabilities:
- Layout Silverlight 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 retrieved by IXRFrameworkElement::GetMinWidth. 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 Silverlight derive from IXRFrameworkElement, either directly or through intermediate base classes such as IXRPanel or IXRControl.
When you create a custom control, it is uncommon to derive from IXRUIElement or IXRFrameworkElement directly. More commonly used base classes for derived custom classes are as follows:
- Specific controls (IXRButton)
- Control-base classes (IXRControl)
- Panel classes (IXRPanel)
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*, 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.
Inheritance Hierarchy
IXRFrameworkElement
.NET Framework Equivalent
System.Windows.FrameworkElement
Requirements
Header | XamlRuntime.h |
sysgen | SYSGEN_XAML_RUNTIME |
Windows Embedded CE | Windows Embedded CE 6.0 R3 |