Framework​Content​Element Class

Definition

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
Inheritance
Derived
Attributes
Implements

Inherited Members

System.Object

System.Windows.ContentElement

System.Windows.DependencyObject

System.Windows.Threading.DispatcherObject

Remarks

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.

Constructors

Framework​Content​Element()

Initializes a new instance of the FrameworkContentElement class.

Fields

Binding​Group​Property

Identifies the BindingGroup dependency property.

Context​Menu​Closing​Event

Identifies the ContextMenuClosing Routed Events Overview.

Context​Menu​Opening​Event

Identifies the ContextMenuOpening Routed Events Overview.

Context​Menu​Property

Identifies the ContextMenu dependency property.

Cursor​Property

Identifies the Cursor dependency property.

Data​Context​Property

Identifies the DataContext dependency property.

Default​Style​Key​Property

Identifies the DefaultStyleKey dependency property.

Focus​Visual​Style​Property

Identifies the FocusVisualStyle dependency property.

Force​Cursor​Property

Identifies the ForceCursor dependency property.

Input​Scope​Property

Identifies the InputScope dependency property.

Language​Property

Identifies the Language dependency property.

Loaded​Event

Identifies the Loaded Routed Events Overview.

Name​Property

Identifies the Name dependency property.

Overrides​Default​Style​Property

Identifies the OverridesDefaultStyle dependency property.

Style​Property

Identifies the Style dependency property.

Tag​Property

Identifies the Tag dependency property.

Tool​Tip​Closing​Event

Identifies the ToolTipClosing Routed Events Overview.

Tool​Tip​Opening​Event

Identifies the ToolTipOpening Routed Events Overview.

Tool​Tip​Property

Identifies the ToolTip dependency property.

Unloaded​Event

Identifies the Unloaded Routed Events Overview.

Properties

Binding​Group

Gets or sets the BindingGroup that is used for the element.

Context​Menu

Gets or sets the context menu element that should appear whenever the context menu is requested via user interface (UI) from within this element.

Cursor

Gets or sets the cursor that displays when the mouse pointer is over this element.

Data​Context

Gets or sets the data context for an element when it participates in data binding.

Default​Style​Key

Gets or sets the key to use to find the style template for this control in themes.

Focus​Visual​Style

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.

Force​Cursor

Gets or sets a value indicating whether this FrameworkContentElement should force the user interface (UI) to render the cursor as declared by this instance's Cursor property.

Input​Scope

Gets or sets the context for input used by this FrameworkContentElement.

Is​Initialized

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.

Is​Loaded

Gets a value indicating whether this element has been loaded for presentation.

Language

Gets or sets localization/globalization language information that applies to an individual element.

Logical​Children

Gets an enumerator for the logical child elements of this element.

Name

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.

Overrides​Default​Style

Gets or sets a value indicating whether this element incorporates style properties from theme styles.

Parent

Gets the parent in the logical tree for this element.

Resources

Gets or sets the current locally-defined resource dictionary.

Style

Gets or sets the style to be used by this element.

Tag

Gets or sets an arbitrary object value that can be used to store custom information about this element.

Templated​Parent

Gets a reference to the template parent of this element. This property is not relevant if the element was not created through a template.

Tool​Tip

Gets or sets the tool-tip object that is displayed for this element in the user interface (UI).

Methods

Add​Logical​Child(​Object)

Adds the provided element as a child of this element.

Begin​Init()

Called before an element is initialized.

Begin​Storyboard(​Storyboard)

Begins the sequence of actions that are contained in the provided storyboard.

Begin​Storyboard(​Storyboard, ​Handoff​Behavior)

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.

Begin​Storyboard(​Storyboard, ​Handoff​Behavior, ​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.

Bring​Into​View()

Attempts to bring this element into view, within any scrollable regions it is contained within.

End​Init()

Called immediately after an element is initialized.

Find​Name(​String)

Finds an element that has the provided identifier name.

Find​Resource(​Object)

Searches for a resource with the specified key, and will throw an exception if the requested resource is not found.

Get​Binding​Expression(​Dependency​Property)

Gets the BindingExpression for the specified property's binding.

Get​UI​Parent​Core()

Returns an alternative logical parent for this element if there is no visual parent. In this case, a FrameworkContentElement parent is always the same value as the Parent property.

Move​Focus(​Traversal​Request)

Moves the keyboard focus from this element to another element.

On​Context​Menu​Closing(​Context​Menu​Event​Args)

Invoked whenever the ContextMenuClosing routed event reaches this class in its route. Implement this method to add class handling for this event.

On​Context​Menu​Opening(​Context​Menu​Event​Args)

Invoked whenever the ContextMenuOpening routed event reaches this class in its route. Implement this method to add class handling for this event.

On​Got​Focus(​Routed​Event​Args)

Class handler for the GotFocus event.

On​Initialized(​Event​Args)

Raises the Initialized event. This method is invoked whenever IsInitialized is set to true.

On​Property​Changed(​Dependency​Property​Changed​Event​Args)

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).

On​Style​Changed(​Style, ​Style)

Invoked when the style that is in use on this element changes.

On​Tool​Tip​Closing(​Tool​Tip​Event​Args)

Invoked whenever the ToolTipClosing routed event reaches this class in its route. Implement this method to add class handling for this event.

On​Tool​Tip​Opening(​Tool​Tip​Event​Args)

Invoked whenever the ToolTipOpening routed event reaches this class in its route. Implement this method to add class handling for this event.

Predict​Focus(​Focus​Navigation​Direction)

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.

Register​Name(​String, ​Object)

Provides an accessor that simplifies access to the NameScope registration method.

Remove​Logical​Child(​Object)

Removes the specified element from the logical tree for this element.

Set​Binding(​Dependency​Property, ​String)

Attaches a binding to this element, based on the provided source property name as a path qualification to the data source.

Set​Binding(​Dependency​Property, ​Binding​Base)

Attaches a binding to this element, based on the provided binding object.

Set​Resource​Reference(​Dependency​Property, ​Object)

Searches for a resource with the specified name and sets up a resource reference to it for the specified property.

Should​Serialize​Resources()

Returns whether serialization processes should serialize the contents of the Resources property on instances of this class.

Should​Serialize​Style()

Returns whether serialization processes should serialize the contents of the Style property on instances of this class.

Try​Find​Resource(​Object)

Searches for a resource with the specified key, and returns that resource if found.

Unregister​Name(​String)

Simplifies access to the NameScope de-registration method.

Update​Default​Style()

Reapplies the default style to the current FrameworkContentElement.

Events

Context​Menu​Closing

Occurs just before any context menu on the element is closed.

Context​Menu​Opening

Occurs when any context menu on the element is opened.

Data​Context​Changed

Occurs when this element's data context changes.

Initialized

Occurs when this FrameworkContentElement is initialized. This coincides with cases where the value of the IsInitialized property changes from false (or undefined) to true.

Loaded

Occurs when the element is laid out, rendered, and ready for interaction.

Source​Updated

Occurs when any associated data source participating in a binding on this element changes.

Target​Updated

Occurs when any associated target property participating in a binding on this element changes.

Tool​Tip​Closing

Occurs just before any tooltip on the element is closed.

Tool​Tip​Opening

Occurs when any tooltip on the element is opened.

Unloaded

Occurs when the element is removed from an element tree of loaded elements.

Explicit Interface Implementations

I​Query​Ambient.​Is​Ambient​Property​Available(​String)

For a description of this member, see the IsAmbientPropertyAvailable(String) method.