Updated: July 2008
is a base class for WPF core level implementations building on Windows Presentation Foundation (WPF) elements and basic presentation characteristics.
Assembly: PresentationCore (in PresentationCore.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
provides a starting point for element layout characteristics, and also exposes virtual methods that derived classes can override, which can influence the layout rendering behavior of the element and its child elements.
Much of the input and focusing behavior for elements in general is also defined in the class. This includes the events for keyboard, mouse and stylus input, and related status properties. Many of these events are routed events, and many of the input-related events have both a bubbling routing version as well as a tunneling version of the event. These paired events are typically the events of greatest interest to control authors.
also includes APIs that relate to the WPF event model, including methods that can raise specified routed events that are sourced from an element instance.
In terms of architecture, can be considered roughly equivalent to a window handle in Win32 programming, or an Element in Dynamic HTML (DHTML) programming. is a base element at the WPF core level.
A has the following capabilities that are specifically defined by the class:
Can render as a child element ( derives from Visual, a high level graphics class)
Contains logic that is used to size and position possible child elements of a (when interpreted by a layout system)
Can respond to user input (including control of where input is getting sent to via their handling of event routing, or routing of commands)
Can raise routed events that travel a route through the logical element tree
Supports some aspects of the animation system
FrameworkElement is the WPF framework-level implementation class that builds on , and adds specific interactions with the WPF framework level. FrameworkElement adds and defines the following capabilities:
Additional framework-specific layout characteristics
Support for richer metadata reporting on properties
Class-specific implementation of certain input base classes and their attached properties or attached events
Further animation support
Another related class is ContentElement. The ContentElement class implements many of the same members as does ; the difference between these two classes has to do with their intended place in the overall content model. A derived class typically defines a relatively rigid content model, meaning that there are restrictions on what elements may be child elements in markup. There might be capacity for taking less restrictive child content in a , but that capacity is typically centralized in designated content properties. A ContentElement derived class is typically not as restrictive about content, to support scenarios such as flow-format documents.
Visibility state affects all input handling by that element. Elements that are not visible do not participate in hit testing and do not receive input events, even if the mouse is over the bounds where the element would be if were visible.
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.