FrameworkContentElement is the WPF framework-level implementation and expansion of the ContentElement base class. FrameworkContentElement adds support for additional input APIs (including tooltips and context menus), storyboards, data context for data binding, styles support, and logical tree helper APIs.
[System.Windows.Markup.RuntimeNameProperty("Name")] [System.Windows.Markup.UsableDuringInitialization(true)] [System.Windows.Markup.XmlLangProperty("Language")] [System.Windows.StyleTypedProperty(Property="FocusVisualStyle", StyleTargetType=typeof(System.Windows.Controls.Control))] public class FrameworkContentElement : System.Windows.ContentElement, System.ComponentModel.ISupportInitialize, System.Windows.IFrameworkInputElement, System.Windows.Markup.IQueryAmbient
FrameworkContentElement does not yet define its own rendering behavior; instantiating an actual FrameworkContentElement class instance in code or markup is possible but displays nothing in a WPF application user interface (UI). Rendering logic must be provided by classes that take FrameworkContentElement child elements as part of their content model, or in FrameworkContentElement derived classes.
FrameworkContentElement deliberately parallels many of the same APIs as FrameworkElement. Note that certain APIs found on FrameworkElement will not have a FrameworkContentElement equivalent. Several of the FrameworkElement APIs are for functionality such as geometry representation or layout, which are not relevant for a FrameworkContentElement.
The majority of existing FrameworkContentElement derived classes will be found in the System.Windows.Documents namespace. Many of these derived classes implement elements for the flow document model. Certain derived classes such as Hyperlink have some control-like functionality, but are derived from FrameworkContentElement such that the control-like elements can still participate in the flow document model.
Initializes a new instance of the FrameworkContentElement class.
Gets or sets the BindingGroup that is used for the element.
Gets or sets the context menu element that should appear whenever the context menu is requested via user interface (UI) from within this element.
Gets or sets the cursor that displays when the mouse pointer is over this element.
Gets or sets the data context for an element when it participates in data binding.
Gets or sets the key to use to find the style template for this control in themes.
Gets or sets an object that enables customization of appearance, effects, or other style characteristics that will apply to this element when it captures keyboard focus.
Gets or sets the context for input used by this FrameworkContentElement.
Gets a value indicating whether this element has been initialized, either by being loaded as Extensible Application Markup Language (XAML), or by explicitly having its EndInit() method called.
Gets a value indicating whether this element has been loaded for presentation.
Gets or sets localization/globalization language information that applies to an individual element.
Gets an enumerator for the logical child elements of this element.
Gets or sets the identifying name of the element. The name provides an instance reference so that programmatic code-behind, such as event handler code, can refer to an element once it is constructed during parsing of XAML.
Gets or sets a value indicating whether this element incorporates style properties from theme styles.
Gets the parent in the logical tree for this element.
Gets or sets the current locally-defined resource dictionary.
Gets or sets the style to be used by this element.
Gets or sets an arbitrary object value that can be used to store custom information about this element.
Gets a reference to the template parent of this element. This property is not relevant if the element was not created through a template.
Gets or sets the tool-tip object that is displayed for this element in the user interface (UI).
Adds the provided element as a child of this element.
Called before an element is initialized.
Begins the sequence of actions that are contained in the provided storyboard.
Begins the sequence of actions that are contained in the provided storyboard, with options specified for what should occur if the property is already animated.
|BeginStoryboard(Storyboard, HandoffBehavior, Boolean)||
Begins the sequence of actions that are contained in the provided storyboard, with specified state for control of the animation after it is started.
Attempts to bring this element into view, within any scrollable regions it is contained within.
Called immediately after an element is initialized.
Finds an element that has the provided identifier name.
Searches for a resource with the specified key, and will throw an exception if the requested resource is not found.
Gets the BindingExpression for the specified property's binding.
Moves the keyboard focus from this element to another element.
Invoked whenever the ContextMenuClosing routed event reaches this class in its route. Implement this method to add class handling for this event.
Invoked whenever the ContextMenuOpening routed event reaches this class in its route. Implement this method to add class handling for this event.
Class handler for the GotFocus event.
Invoked whenever the effective value of any dependency property on this FrameworkContentElement has been updated. The specific dependency property that changed is reported in the arguments parameter. Overrides OnPropertyChanged(DependencyPropertyChangedEventArgs).
Invoked when the style that is in use on this element changes.
Invoked whenever the ToolTipClosing routed event reaches this class in its route. Implement this method to add class handling for this event.
Invoked whenever the ToolTipOpening routed event reaches this class in its route. Implement this method to add class handling for this event.
Determines the next element that would receive focus relative to this element for a provided focus movement direction, but does not actually move the focus. This method is sealed and cannot be overridden.
Provides an accessor that simplifies access to the NameScope registration method.
Removes the specified element from the logical tree for this element.
Attaches a binding to this element, based on the provided source property name as a path qualification to the data source.
Attaches a binding to this element, based on the provided binding object.
Searches for a resource with the specified name and sets up a resource reference to it for the specified property.
Returns whether serialization processes should serialize the contents of the Resources property on instances of this class.
Returns whether serialization processes should serialize the contents of the Style property on instances of this class.
Searches for a resource with the specified key, and returns that resource if found.
Simplifies access to the NameScope de-registration method.
Reapplies the default style to the current FrameworkContentElement.
Occurs just before any context menu on the element is closed.
Occurs when any context menu on the element is opened.
Occurs when this element's data context changes.
Occurs when the element is laid out, rendered, and ready for interaction.
Occurs when any associated data source participating in a binding on this element changes.
Occurs when any associated target property participating in a binding on this element changes.
Occurs just before any tooltip on the element is closed.
Occurs when any tooltip on the element is opened.
Occurs when the element is removed from an element tree of loaded elements.
Explicit Interface Implementations
For a description of this member, see the IsAmbientPropertyAvailable(String) method.