Updated: July 2008
Provides a WPF framework-level set of properties, events, and methods for Windows Presentation Foundation (WPF) elements. This class represents the provided WPF framework-level implementation built on the WPF core-level APIs defined by UIElement.
Assembly: PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
[RuntimeNamePropertyAttribute("Name")] [StyleTypedPropertyAttribute(Property = "FocusVisualStyle", StyleTargetType = typeof(Control))] [XmlLangPropertyAttribute("Language")] public class FrameworkElement : UIElement, IFrameworkInputElement, IInputElement, ISupportInitialize
extends UIElement and adds the following capabilities:
Layout system definition: provides specific WPF framework-level implementations for certain methods that were defined as virtual members in UIElement. Most notably, seals certain WPF core-level layout overrides, and instead provides a WPF framework-level equivalent that derived classes should override instead. For example, seals ArrangeCore but provides ArrangeOverride. These changes reflect the fact that at the WPF framework-level there is a full layout system in place that can render any derived class. At the WPF core level, certain members that will structure a general WPF based layout solution are in place, but the actual engine of the layout system is not defined. For more information, see The Layout System.
The logical tree: The general WPF programming model is often expressed in terms of being a tree of elements. Support for expressing the tree of elements as a logical tree, and accompanying support for defining that tree in markup is implemented at the level. Note however that deliberately does not define a content model, and leaves that responsibility to derived classes. For more information, see Trees in WPF.
Object lifetime events: It is often useful to know when an element is initialized (the constructor is called) or when the element is first loaded into a logical tree. defines several events related to object lifetime that provide useful hooks for code-behind operations that involve elements, such as adding more child elements. For more information, see Object Lifetime Events.
Support for data binding and dynamic resource references: The property-level support for data binding and resources is implemented by the DependencyProperty class and embodied in the property system, but the ability to resolve a member value that is stored as an Expression (the programming construct that underlies both data binding and dynamic resources) is implemented by . For more information, see Data Binding Overview and Resources Overview.
More animation support: Some animation support was already defined at the WPF core level, but extends this by implementing BeginStoryboard and related members.
If you intend to use as a base class, you might want to first examine the existing derived classes. provides support for a number of basic scenarios, but also lacks a number of features that are desirable for an "element" in the sense of a building block that you use to create user interface (UI) in Extensible Application Markup Language (XAML). For instance, a does not define any true content model; as a base class does not define a property that can create XAML child elements. In particular, you might want to look at Control and ContentControl.
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.