ContentElement Class

Provides a WPF core-level base class for content elements. Content elements are designed for flow-style presentation, using an intuitive markup-oriented layout model and a deliberately simple object model.

Namespace:  System.Windows
Assembly:  PresentationCore (in PresentationCore.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation

'Declaration
Public Class ContentElement _
	Inherits DependencyObject _
	Implements IInputElement, IAnimatable
<ContentElement .../>

The ContentElement type exposes the following members.

  NameDescription
Public methodContentElementInitializes a new instance of the ContentElement class.
Top

  NameDescription
Public propertyAllowDropGets or sets a value that indicates whether this element can be used as the target of a drag-and-drop operation.
Public propertyAreAnyTouchesCapturedGets a value that indicates whether at least one touch is captured to this element.
Public propertyAreAnyTouchesCapturedWithinGets a value that indicates whether at least one touch is captured to this element or to any child elements in its visual tree.
Public propertyAreAnyTouchesDirectlyOverGets a value that indicates whether at least one touch is pressed over this element.
Public propertyAreAnyTouchesOverGets a value that indicates whether at least one touch is pressed over this element or any child elements in its visual tree.
Public propertyCommandBindingsGets a collection of CommandBinding objects that are associated with this element.
Public propertyDependencyObjectTypeGets the DependencyObjectType that wraps the CLR type of this instance.  (Inherited from DependencyObject.)
Public propertyDispatcherGets the Dispatcher this DispatcherObject is associated with. (Inherited from DispatcherObject.)
Public propertyFocusableGets or sets a value that indicates whether the element can receive focus.
Public propertyHasAnimatedPropertiesGets a value that indicates whether this element has any animated properties.
Public propertyInputBindingsGets the collection of input bindings that are associated with this element.
Public propertyIsEnabledGets or sets a value that indicates whether this element is enabled in the user interface (UI).  
Protected propertyIsEnabledCoreGets a value that becomes the return value of IsEnabled in derived classes.
Public propertyIsFocusedGets a value that determines whether this element has logical focus.
Public propertyIsInputMethodEnabledGets a value that indicates whether an input method system, such as an Input Method Editor (IME), is enabled for processing the input to this element.
Public propertyIsKeyboardFocusedGets a value that indicates whether this element has keyboard focus.
Public propertyIsKeyboardFocusWithinGets a value that indicates whether keyboard focus is anywhere within the element or child elements.
Public propertyIsMouseCapturedGets a value that indicates whether the mouse is captured by this element.
Public propertyIsMouseCaptureWithinGets a value that determines whether mouse capture is held by this element or by child elements in its element tree.
Public propertyIsMouseDirectlyOverGets a value that indicates whether the position of the mouse pointer corresponds to hit test results, which take element compositing into account.
Public propertyIsMouseOverGets a value that indicates whether the mouse pointer is located over this element (including visual child elements, or its control compositing).
Public propertyIsSealedGets a value that indicates whether this instance is currently sealed (read-only). (Inherited from DependencyObject.)
Public propertyIsStylusCapturedGets a value that indicates whether the stylus is captured to this element.
Public propertyIsStylusCaptureWithinGets a value that determines whether stylus capture is held by this element, including child elements and control compositing.
Public propertyIsStylusDirectlyOverGets a value that indicates whether the stylus position corresponds to hit test results, which take element compositing into account.
Public propertyIsStylusOverGets a value that indicates whether the stylus is located over this element (including visual child elements).
Public propertyTouchesCapturedGets all touch devices that are captured to this element.
Public propertyTouchesCapturedWithinGets all touch devices that are captured to this element or any child elements in its visual tree.
Public propertyTouchesDirectlyOverGets all touch devices that are over this element.
Public propertyTouchesOverGets all touch devices that are over this element or any child elements in its visual tree.
Top

  NameDescription
Public methodAddHandler(RoutedEvent, Delegate)Adds a routed event handler for a specified routed event, adding the handler to the handler collection on the current element.
Public methodAddHandler(RoutedEvent, Delegate, Boolean)Adds a routed event handler for a specified routed event, adding the handler to the handler collection on the current element. Specify handledEventsToo as true to have the provided handler be invoked for routed event that had already been marked as handled by another element along the event route.
Public methodAddToEventRouteAdds handlers to the specified EventRoute for the current ContentElement event handler collection.
Public methodApplyAnimationClock(DependencyProperty, AnimationClock)Applies an animation to a specified dependency property on this element. Any existing animations are stopped and replaced with the new animation.
Public methodApplyAnimationClock(DependencyProperty, AnimationClock, HandoffBehavior)Applies an animation to a specified dependency property on this element, with the ability to specify what happens if the property already has a running animation.
Public methodBeginAnimation(DependencyProperty, AnimationTimeline)Starts an animation for a specified animated property on this element.
Public methodBeginAnimation(DependencyProperty, AnimationTimeline, HandoffBehavior)Starts a specific animation for a specified animated property on this element, with the option of specifying what happens if the property already has a running animation.
Public methodCaptureMouseAttempts to force capture of the mouse to this element.
Public methodCaptureStylusAttempts to force capture of the stylus to this element.
Public methodCaptureTouchAttempts to force capture of a touch to this element.
Public methodCheckAccessDetermines whether the calling thread has access to this DispatcherObject. (Inherited from DispatcherObject.)
Public methodClearValue(DependencyProperty)Clears the local value of a property. The property to be cleared is specified by a DependencyProperty identifier. (Inherited from DependencyObject.)
Public methodClearValue(DependencyPropertyKey)Clears the local value of a read-only property. The property to be cleared is specified by a DependencyPropertyKey. (Inherited from DependencyObject.)
Public methodCoerceValueCoerces the value of the specified dependency property. This is accomplished by invoking any CoerceValueCallback function specified in property metadata for the dependency property as it exists on the calling DependencyObject. (Inherited from DependencyObject.)
Public methodEqualsDetermines whether a provided DependencyObject is equivalent to the current DependencyObject. (Inherited from DependencyObject.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodFocusAttempts to set focus to this element.
Public methodGetAnimationBaseValueReturns the base property value for the specified property on this element, disregarding any possible animated value from a running or stopped animation.
Public methodGetHashCodeGets a hash code for this DependencyObject. (Inherited from DependencyObject.)
Public methodGetLocalValueEnumeratorCreates a specialized enumerator for determining which dependency properties have locally set values on this DependencyObject. (Inherited from DependencyObject.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodGetUIParentCoreWhen overridden in a derived class, returns an alternative user interface (UI) parent for this element if no visual parent exists.
Public methodGetValueReturns the current effective value of a dependency property on this instance of a DependencyObject. (Inherited from DependencyObject.)
Public methodInvalidatePropertyRe-evaluates the effective value for the specified dependency property (Inherited from DependencyObject.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodMoveFocusAttempts to move focus from this element to another element. The direction to move focus is specified by a guidance direction, which is interpreted within the organization of the visual parent for this element.
Protected methodOnCreateAutomationPeerReturns class-specific AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.
Protected methodOnDragEnterInvoked when an unhandled DragDrop.DragEnter attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnDragLeaveInvoked when an unhandled DragDrop.DragLeave attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnDragOverInvoked when an unhandled DragDrop.DragOver attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnDropInvoked when an unhandled DragDrop.DragEnter attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnGiveFeedbackInvoked when an unhandled DragDrop.GiveFeedback attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnGotFocusRaises the GotFocus routed event by using the event data provided.
Protected methodOnGotKeyboardFocusInvoked when an unhandled Keyboard.GotKeyboardFocus attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnGotMouseCaptureInvoked when an unhandled Mouse.GotMouseCapture attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnGotStylusCaptureInvoked when an unhandled Stylus.GotStylusCapture attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnGotTouchCaptureProvides class handling for the GotTouchCapture routed event that occurs when a touch is captured to this element.
Protected methodOnIsKeyboardFocusedChangedInvoked when an unhandled IsKeyboardFocusedChanged event is raised on this element. Implement this method to add class handling for this event.
Protected methodOnIsKeyboardFocusWithinChangedInvoked just before the IsKeyboardFocusWithinChanged event is raised by this element. Implement this method to add class handling for this event.
Protected methodOnIsMouseCapturedChangedInvoked when an unhandled IsMouseCapturedChanged event is raised on this element. Implement this method to add class handling for this event.
Protected methodOnIsMouseCaptureWithinChangedInvoked when an unhandled IsMouseCaptureWithinChanged event is raised on this element. Implement this method to add class handling for this event.
Protected methodOnIsMouseDirectlyOverChangedInvoked when an unhandled IsMouseDirectlyOverChanged event is raised on this element. Implement this method to add class handling for this event.
Protected methodOnIsStylusCapturedChangedInvoked when an unhandled IsStylusCapturedChanged event is raised on this element. Implement this method to add class handling for this event.
Protected methodOnIsStylusCaptureWithinChangedInvoked when an unhandled IsStylusCaptureWithinChanged event is raised on this element. Implement this method to add class handling for this event.
Protected methodOnIsStylusDirectlyOverChangedInvoked when an unhandled IsStylusDirectlyOverChanged event is raised on this element. Implement this method to add class handling for this event.
Protected methodOnKeyDownInvoked when an unhandled Keyboard.KeyDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnKeyUpInvoked when an unhandled Keyboard.KeyUp attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnLostFocusRaises the LostFocus routed event by using the event data that is provided.
Protected methodOnLostKeyboardFocusInvoked when an unhandled Keyboard.LostKeyboardFocus attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnLostMouseCaptureInvoked when an unhandled Mouse.LostMouseCapture attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnLostStylusCaptureInvoked when an unhandled Stylus.LostStylusCapture attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnLostTouchCaptureProvides class handling for the LostTouchCapture routed event that occurs when this element loses a touch capture.
Protected methodOnMouseDownInvoked when an unhandled Mouse.MouseDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnMouseEnterInvoked when an unhandled Mouse.MouseEnter attached event is raised on this element. Implement this method to add class handling for this event.
Protected methodOnMouseLeaveInvoked when an unhandled Mouse.MouseLeave attached event is raised on this element. Implement this method to add class handling for this event.
Protected methodOnMouseLeftButtonDownInvoked when an unhandled MouseLeftButtonDown routed event is raised on this element. Implement this method to add class handling for this event.
Protected methodOnMouseLeftButtonUpInvoked when an unhandled MouseLeftButtonUp routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnMouseMoveInvoked when an unhandled Mouse.MouseMove attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnMouseRightButtonDownInvoked when an unhandled MouseRightButtonDown routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnMouseRightButtonUpInvoked when an unhandled MouseRightButtonUp routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnMouseUpInvoked when an unhandled Mouse.MouseUp routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnMouseWheelInvoked when an unhandled Mouse.MouseWheel attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnPreviewDragEnterInvoked when an unhandled DragDrop.PreviewDragEnter attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnPreviewDragLeaveInvoked when an unhandled DragDrop.PreviewDragLeave attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnPreviewDragOverInvoked when an unhandled DragDrop.PreviewDragOver attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnPreviewDropInvoked when an unhandled DragDrop.PreviewDrop attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnPreviewGiveFeedbackInvoked when an unhandled DragDrop.PreviewGiveFeedback attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnPreviewGotKeyboardFocusInvoked when an unhandled Keyboard.PreviewGotKeyboardFocus attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnPreviewKeyDownInvoked when an unhandled Keyboard.PreviewKeyDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnPreviewKeyUpInvoked when an unhandled Keyboard.PreviewKeyUp attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnPreviewLostKeyboardFocusInvoked when an unhandled Keyboard.PreviewKeyDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnPreviewMouseDownInvoked when an unhandled Mouse.PreviewMouseDown attached routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnPreviewMouseLeftButtonDownInvoked when an unhandled PreviewMouseLeftButtonDown routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnPreviewMouseLeftButtonUpInvoked when an unhandled PreviewMouseLeftButtonUp routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnPreviewMouseMoveInvoked when an unhandled Mouse.PreviewMouseMove attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnPreviewMouseRightButtonDownInvoked when an unhandled PreviewMouseRightButtonDown routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnPreviewMouseRightButtonUpInvoked when an unhandled PreviewMouseRightButtonUp routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnPreviewMouseUpInvoked when an unhandled Mouse.PreviewMouseUp attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnPreviewMouseWheelInvoked when an unhandled Mouse.PreviewMouseWheel attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnPreviewQueryContinueDragInvoked when an unhandled DragDrop.PreviewQueryContinueDrag attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnPreviewStylusButtonDownInvoked when an unhandled Stylus.PreviewStylusButtonDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnPreviewStylusButtonUpInvoked when an unhandled Stylus.PreviewStylusButtonUp attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnPreviewStylusDownInvoked when an unhandled Stylus.PreviewStylusDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnPreviewStylusInAirMoveInvoked when an unhandled Stylus.PreviewStylusInAirMove attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnPreviewStylusInRangeInvoked when an unhandled Stylus.PreviewStylusInRange attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnPreviewStylusMoveInvoked when an unhandled Stylus.PreviewStylusMove attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnPreviewStylusOutOfRangeInvoked when an unhandled Stylus.PreviewStylusOutOfRange attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnPreviewStylusSystemGestureInvoked when an unhandled Stylus.PreviewStylusSystemGesture attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnPreviewStylusUpInvoked when an unhandled Stylus.PreviewStylusUp attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnPreviewTextInputInvoked when an unhandled TextCompositionManager.PreviewTextInput attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnPreviewTouchDownProvides class handling for the PreviewTouchDown routed event that occurs when a touch presses this element.
Protected methodOnPreviewTouchMoveProvides class handling for the PreviewTouchMove routed event that occurs when a touch moves while inside this element.
Protected methodOnPreviewTouchUpProvides class handling for the PreviewTouchUp routed event that occurs when a touch is released inside this element.
Protected methodOnPropertyChangedInvoked whenever the effective value of any dependency property on this DependencyObject has been updated. The specific dependency property that changed is reported in the event data. (Inherited from DependencyObject.)
Protected methodOnQueryContinueDragInvoked when an unhandled DragDrop.QueryContinueDrag attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnQueryCursorInvoked when an unhandled Mouse.QueryCursor attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnStylusButtonDownInvoked when an unhandled Stylus.StylusButtonDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnStylusButtonUpInvoked when an unhandled Stylus.StylusButtonUp attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnStylusDownInvoked when an unhandled Stylus.StylusDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnStylusEnterInvoked when an unhandled Stylus.StylusEnter attached event is raised by this element. Implement this method to add class handling for this event.
Protected methodOnStylusInAirMoveInvoked when an unhandled Stylus.StylusInAirMove attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnStylusInRangeInvoked when an unhandled Stylus.StylusInRange attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnStylusLeaveInvoked when an unhandled Stylus.StylusLeave attached event is raised by this element. Implement this method to add class handling for this event.
Protected methodOnStylusMoveInvoked when an unhandled Stylus.StylusMove attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnStylusOutOfRangeInvoked when an unhandled Stylus.StylusOutOfRange attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnStylusSystemGestureInvoked when an unhandled Stylus.StylusSystemGesture attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnStylusUpInvoked when an unhandled Stylus.StylusUp attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnTextInputInvoked when an unhandled TextCompositionManager.TextInput attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Protected methodOnTouchDownProvides class handling for the TouchDown routed event that occurs when a touch presses inside this element.
Protected methodOnTouchEnterProvides class handling for the TouchEnter routed event that occurs when a touch moves from outside to inside the bounds of this element.
Protected methodOnTouchLeaveProvides class handling for the TouchLeave routed event that occurs when a touch moves from inside to outside the bounds of this element.
Protected methodOnTouchMoveProvides class handling for the TouchMove routed event that occurs when a touch moves while inside this element.
Protected methodOnTouchUpProvides class handling for the TouchUp routed event that occurs when a touch is released inside this element.
Public methodPredictFocusWhen overridden in a derived class, returns the element that would receive focus for a specified focus traversal direction, without actually moving focus to that element.
Public methodRaiseEventRaises a specific routed event. The RoutedEvent to be raised is identified within the RoutedEventArgs instance that is provided (as the RoutedEvent property of that event data).
Public methodReadLocalValueReturns the local value of a dependency property, if it exists. (Inherited from DependencyObject.)
Public methodReleaseAllTouchCapturesReleases all captured touch devices from this element.
Public methodReleaseMouseCaptureReleases the mouse capture, if this element held the capture.
Public methodReleaseStylusCaptureReleases the stylus device capture, if this element held the capture.
Public methodReleaseTouchCaptureAttempts to release the specified touch device from this element.
Public methodRemoveHandlerRemoves the specified routed event handler from this element.
Public methodSetCurrentValueSets the value of a dependency property without changing its value source. (Inherited from DependencyObject.)
Public methodSetValue(DependencyProperty, Object)Sets the local value of a dependency property, specified by its dependency property identifier. (Inherited from DependencyObject.)
Public methodSetValue(DependencyPropertyKey, Object)Sets the local value of a read-only dependency property, specified by the DependencyPropertyKey identifier of the dependency property. (Inherited from DependencyObject.)
Public methodShouldSerializeCommandBindingsReturns whether serialization processes should serialize the contents of the CommandBindings property on instances of this class.
Public methodShouldSerializeInputBindingsReturns whether serialization processes should serialize the contents of the InputBindings property on instances of this class.
Protected methodShouldSerializePropertyReturns a value that indicates whether serialization processes should serialize the value for the provided dependency property. (Inherited from DependencyObject.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodVerifyAccessEnforces that the calling thread has access to this DispatcherObject. (Inherited from DispatcherObject.)
Top

  NameDescription
Public eventDragEnterOccurs when the input system reports an underlying drag event with this element as the drag target.
Public eventDragLeaveOccurs when the input system reports an underlying drag event with this element as the drag origin.
Public eventDragOverOccurs when the input system reports an underlying drag event with this element as the potential drop target.
Public eventDropOccurs when the input system reports an underlying drop event with this element as the drop target.
Public eventFocusableChangedOccurs when the value of the Focusable property changes.
Public eventGiveFeedbackOccurs when the input system reports an underlying drag-and-drop event that involves this element.
Public eventGotFocusOccurs when this element gets logical focus.
Public eventGotKeyboardFocusOccurs when the keyboard is focused on this element.
Public eventGotMouseCaptureOccurs when this element captures the mouse.
Public eventGotStylusCaptureOccurs when this element captures the stylus.
Public eventGotTouchCaptureOccurs when a touch is captured to this element.
Public eventIsEnabledChangedOccurs when the value of the IsEnabled property on this element changes.
Public eventIsKeyboardFocusedChangedOccurs when the value of the IsKeyboardFocused property changes on this element.
Public eventIsKeyboardFocusWithinChangedOccurs when the value of the IsKeyboardFocusWithinChanged property changes on this element.
Public eventIsMouseCapturedChangedOccurs when the value of the IsMouseCaptured property changes on this element.
Public eventIsMouseCaptureWithinChangedOccurs when the value of the IsMouseCaptureWithinProperty changes on this element.
Public eventIsMouseDirectlyOverChangedOccurs when the value of the IsMouseDirectlyOver property changes on this element.
Public eventIsStylusCapturedChangedOccurs when the value of the IsStylusCaptured property changes on this element.
Public eventIsStylusCaptureWithinChangedOccurs when the value of the IsStylusCaptureWithin property changes on this element.
Public eventIsStylusDirectlyOverChangedOccurs when the value of the IsStylusDirectlyOver property changes on this element.
Public eventKeyDownOccurs when a key is pressed while focus is on this element.
Public eventKeyUpOccurs when a key is released while focus is on this element.
Public eventLostFocusOccurs when this element loses logical focus.
Public eventLostKeyboardFocusOccurs when the keyboard is no longer focused on this element.
Public eventLostMouseCaptureOccurs when this element loses mouse capture.
Public eventLostStylusCaptureOccurs when this element loses stylus capture.
Public eventLostTouchCaptureOccurs when this element loses a touch capture.
Public eventMouseDownOccurs when any mouse button is pressed while the pointer is over this element.
Public eventMouseEnterOccurs when the mouse pointer enters the bounds of this element.
Public eventMouseLeaveOccurs when the mouse pointer leaves the bounds of this element.
Public eventMouseLeftButtonDownOccurs when the left mouse button is pressed while the mouse pointer is over this element.
Public eventMouseLeftButtonUpOccurs when the left mouse button is released while the mouse pointer is over this element.
Public eventMouseMoveOccurs when the mouse pointer moves while over this element.
Public eventMouseRightButtonDownOccurs when the right mouse button is pressed while the mouse pointer is over this element.
Public eventMouseRightButtonUpOccurs when the right mouse button is released while the mouse pointer is over this element.
Public eventMouseUpOccurs when any mouse button is released over this element.
Public eventMouseWheelOccurs when the user rotates the mouse wheel while the mouse pointer is over this element.
Public eventPreviewDragEnterOccurs when the input system reports an underlying drag event with this element as the drag target.
Public eventPreviewDragLeaveOccurs when the input system reports an underlying drag event with this element as the drag origin.
Public eventPreviewDragOverOccurs when the input system reports an underlying drag event with this element as the potential drop target.
Public eventPreviewDropOccurs when the input system reports an underlying drop event with this element as the drop target.
Public eventPreviewGiveFeedbackOccurs when a drag-and-drop operation is started.
Public eventPreviewGotKeyboardFocusOccurs when the keyboard is focused on this element.
Public eventPreviewKeyDownOccurs when a key is pressed while the keyboard is focused on this element.
Public eventPreviewKeyUpOccurs when a key is released while the keyboard is focused on this element.
Public eventPreviewLostKeyboardFocusOccurs when the keyboard is no longer focused on this element.
Public eventPreviewMouseDownOccurs when any mouse button is pressed while the pointer is over this element.
Public eventPreviewMouseLeftButtonDownOccurs when the left mouse button is pressed while the mouse pointer is over this element.
Public eventPreviewMouseLeftButtonUpOccurs when the left mouse button is released while the mouse pointer is over this element.
Public eventPreviewMouseMoveOccurs when the mouse pointer moves while the mouse pointer is over this element.
Public eventPreviewMouseRightButtonDownOccurs when the right mouse button is pressed while the mouse pointer is over this element.
Public eventPreviewMouseRightButtonUpOccurs when the right mouse button is released while the mouse pointer is over this element.
Public eventPreviewMouseUpOccurs when any mouse button is released while the mouse pointer is over this element.
Public eventPreviewMouseWheelOccurs when the user rotates the mouse wheel while the mouse pointer is over this element.
Public eventPreviewQueryContinueDragOccurs when there is a change in the keyboard or mouse button state during a drag-and-drop operation.
Public eventPreviewStylusButtonDownOccurs when the stylus button is pressed while the pointer is over this element.
Public eventPreviewStylusButtonUpOccurs when the stylus button is released while the pointer is over this element.
Public eventPreviewStylusDownOccurs when the stylus touches the digitizer while it is over this element.
Public eventPreviewStylusInAirMoveOccurs when the stylus moves over an element without actually touching the digitizer.
Public eventPreviewStylusInRangeOccurs when the stylus is close enough to the digitizer to be detected, while over this element.
Public eventPreviewStylusMoveOccurs when the stylus moves while over the element. The stylus must move while being detected by the  digitizer to raise this event, otherwise, PreviewStylusInAirMove is raised instead.
Public eventPreviewStylusOutOfRangeOccurs when the stylus is too far from the digitizer to be detected.
Public eventPreviewStylusSystemGestureOccurs when a user performs one of several stylus gestures.
Public eventPreviewStylusUpOccurs when the user raises the stylus off the digitizer while the stylus is over this element.
Public eventPreviewTextInputOccurs when this element gets text in a device-independent manner.
Public eventPreviewTouchDownOccurs when a finger touches the screen while the finger is over this element.
Public eventPreviewTouchMoveOccurs when a finger moves on the screen while the finger is over this element.
Public eventPreviewTouchUpOccurs when a finger is raised off of the screen while the finger is over this element.
Public eventQueryContinueDragOccurs when there is a change in the keyboard or mouse button state during a drag-and-drop operation.
Public eventQueryCursorOccurs when the cursor is requested to display. This event is raised on an element each time that the mouse pointer moves to a new location, which means the cursor object might need to be changed based on its new position.
Public eventStylusButtonDownOccurs when the stylus button is pressed while the pointer is over this element.
Public eventStylusButtonUpOccurs when the stylus button is released while the pointer is over this element.
Public eventStylusDownOccurs when the stylus touches the digitizer while the stylus is over this element.
Public eventStylusEnterOccurs when the stylus enters the bounds of this element.
Public eventStylusInAirMoveOccurs when the stylus moves over an element without actually touching the digitizer.
Public eventStylusInRangeOccurs when the stylus is close enough to the digitizer to be detected, while over this element.
Public eventStylusLeaveOccurs when the stylus leaves the bounds of the element.
Public eventStylusMoveOccurs when the stylus moves over this element. The stylus must move while on the digitizer to raise this event. Otherwise, StylusInAirMove is raised instead.
Public eventStylusOutOfRangeOccurs when the stylus is too far from the digitizer to be detected, while over this element.
Public eventStylusSystemGestureOccurs when a user performs one of several stylus gestures.
Public eventStylusUpOccurs when the user raises the stylus off the digitizer while it is over this element.
Public eventTextInputOccurs when this element gets text in a device-independent manner.
Public eventTouchDownOccurs when a finger touches the screen while the finger is over this element.
Public eventTouchEnterOccurs when a touch moves from outside to inside the bounds of this element.
Public eventTouchLeaveOccurs when a touch moves from inside to outside the bounds of this element.
Public eventTouchMoveOccurs when a finger moves on the screen while the finger is over this element.
Public eventTouchUpOccurs when a finger is raised off of the screen while the finger is over this element.
Top

  NameDescription
Public fieldStatic memberAllowDropPropertyIdentifies the AllowDrop dependency property.
Public fieldStatic memberAreAnyTouchesCapturedPropertyIdentifies the AreAnyTouchesCaptured dependency property.
Public fieldStatic memberAreAnyTouchesCapturedWithinPropertyIdentifies the AreAnyTouchesCapturedWithin dependency property.
Public fieldStatic memberAreAnyTouchesDirectlyOverPropertyIdentifies the AreAnyTouchesDirectlyOver dependency property.
Public fieldStatic memberAreAnyTouchesOverPropertyIdentifies the AreAnyTouchesOver dependency property.
Public fieldStatic memberDragEnterEventIdentifies the DragEnter routed event.
Public fieldStatic memberDragLeaveEventIdentifies the DragLeave routed event.
Public fieldStatic memberDragOverEventIdentifies the DragOver routed event.
Public fieldStatic memberDropEventIdentifies the Drop routed event.
Public fieldStatic memberFocusablePropertyIdentifies the Focusable dependency property.
Public fieldStatic memberGiveFeedbackEventIdentifies the GiveFeedback routed event.
Public fieldStatic memberGotFocusEventIdentifies the GotFocus routed event.
Public fieldStatic memberGotKeyboardFocusEventIdentifies the GotKeyboardFocus routed event.
Public fieldStatic memberGotMouseCaptureEventIdentifies the GotMouseCapture routed event.
Public fieldStatic memberGotStylusCaptureEventIdentifies the GotStylusCapture routed event.
Public fieldStatic memberGotTouchCaptureEventIdentifies the GotTouchCapture routed event.
Public fieldStatic memberIsEnabledPropertyIdentifies the IsEnabled dependency property.
Public fieldStatic memberIsFocusedPropertyIdentifies the IsFocused dependency property.
Public fieldStatic memberIsKeyboardFocusedPropertyIdentifies the IsKeyboardFocused dependency property.
Public fieldStatic memberIsKeyboardFocusWithinPropertyIdentifies the IsKeyboardFocusWithin dependency property.
Public fieldStatic memberIsMouseCapturedPropertyIdentifies the IsMouseCaptured dependency property.
Public fieldStatic memberIsMouseCaptureWithinPropertyIdentifies the IsMouseCaptureWithin dependency property.
Public fieldStatic memberIsMouseDirectlyOverPropertyIdentifies the IsMouseDirectlyOver dependency property.
Public fieldStatic memberIsMouseOverPropertyIdentifies the IsMouseOver dependency property.
Public fieldStatic memberIsStylusCapturedPropertyIdentifies the IsStylusCaptured dependency property.
Public fieldStatic memberIsStylusCaptureWithinPropertyIdentifies the IsStylusCaptureWithin dependency property.
Public fieldStatic memberIsStylusDirectlyOverPropertyIdentifies the IsStylusDirectlyOver dependency property.
Public fieldStatic memberIsStylusOverPropertyIdentifies the IsStylusOver dependency property.
Public fieldStatic memberKeyDownEventIdentifies the KeyDown routed event.
Public fieldStatic memberKeyUpEventIdentifies the KeyUp routed event.
Public fieldStatic memberLostFocusEventIdentifies the LostFocus routed event.
Public fieldStatic memberLostKeyboardFocusEventIdentifies the LostKeyboardFocus routed event.
Public fieldStatic memberLostMouseCaptureEventIdentifies the LostMouseCapture routed event.
Public fieldStatic memberLostStylusCaptureEventIdentifies the LostStylusCapture routed event.
Public fieldStatic memberLostTouchCaptureEventIdentifies the LostTouchCapture routed event.
Public fieldStatic memberMouseDownEventIdentifies the MouseDown routed event.
Public fieldStatic memberMouseEnterEventIdentifies the MouseEnter routed event.
Public fieldStatic memberMouseLeaveEventIdentifies the MouseLeave routed event.
Public fieldStatic memberMouseLeftButtonDownEventIdentifies the MouseLeftButtonDown routed event.
Public fieldStatic memberMouseLeftButtonUpEventIdentifies the MouseLeftButtonUp routed event.
Public fieldStatic memberMouseMoveEventIdentifies the MouseMove routed event.
Public fieldStatic memberMouseRightButtonDownEventIdentifies the MouseRightButtonDown routed event.
Public fieldStatic memberMouseRightButtonUpEventIdentifies the MouseRightButtonUp routed event.
Public fieldStatic memberMouseUpEventIdentifies the MouseUp routed event.
Public fieldStatic memberMouseWheelEventIdentifies the MouseWheel routed event.
Public fieldStatic memberPreviewDragEnterEventIdentifies the PreviewDragEnter routed event.
Public fieldStatic memberPreviewDragLeaveEventIdentifies the PreviewDragLeave routed event.
Public fieldStatic memberPreviewDragOverEventIdentifies the PreviewDragOver routed event.
Public fieldStatic memberPreviewDropEventIdentifies the PreviewDrop routed event.
Public fieldStatic memberPreviewGiveFeedbackEventIdentifies the PreviewGiveFeedback routed event.
Public fieldStatic memberPreviewGotKeyboardFocusEventIdentifies the PreviewGotKeyboardFocus routed event.
Public fieldStatic memberPreviewKeyDownEventIdentifies the PreviewKeyDown routed event.
Public fieldStatic memberPreviewKeyUpEventIdentifies the PreviewKeyUp routed event.
Public fieldStatic memberPreviewLostKeyboardFocusEventIdentifies the PreviewLostKeyboardFocus routed event.
Public fieldStatic memberPreviewMouseDownEventIdentifies the PreviewMouseDown routed event.
Public fieldStatic memberPreviewMouseLeftButtonDownEventIdentifies the PreviewMouseLeftButtonDown routed event.
Public fieldStatic memberPreviewMouseLeftButtonUpEventIdentifies the PreviewMouseLeftButtonUp routed event.
Public fieldStatic memberPreviewMouseMoveEventIdentifies the PreviewMouseMove routed event.
Public fieldStatic memberPreviewMouseRightButtonDownEventIdentifies the PreviewMouseRightButtonDown routed event.
Public fieldStatic memberPreviewMouseRightButtonUpEventIdentifies the PreviewMouseRightButtonUp routed event.
Public fieldStatic memberPreviewMouseUpEventIdentifies the PreviewMouseUp routed event.
Public fieldStatic memberPreviewMouseWheelEventIdentifies the PreviewMouseWheel routed event.
Public fieldStatic memberPreviewQueryContinueDragEventIdentifies the PreviewQueryContinueDrag routed event.
Public fieldStatic memberPreviewStylusButtonDownEventIdentifies the PreviewStylusButtonDown routed event.
Public fieldStatic memberPreviewStylusButtonUpEventIdentifies the PreviewStylusButtonUp routed event.
Public fieldStatic memberPreviewStylusDownEventIdentifies the PreviewStylusDown routed event.
Public fieldStatic memberPreviewStylusInAirMoveEventIdentifies the PreviewStylusInAirMove routed event.
Public fieldStatic memberPreviewStylusInRangeEventIdentifies the PreviewStylusInRange routed event.
Public fieldStatic memberPreviewStylusMoveEventIdentifies the PreviewStylusMove routed event.
Public fieldStatic memberPreviewStylusOutOfRangeEventIdentifies the PreviewStylusOutOfRange routed event.
Public fieldStatic memberPreviewStylusSystemGestureEventIdentifies the PreviewStylusSystemGesture routed event.
Public fieldStatic memberPreviewStylusUpEventIdentifies the PreviewStylusUp routed event.
Public fieldStatic memberPreviewTextInputEventIdentifies the PreviewTextInput routed event.
Public fieldStatic memberPreviewTouchDownEventIdentifies the PreviewTouchDown routed event.
Public fieldStatic memberPreviewTouchMoveEventIdentifies the PreviewTouchMove routed event.
Public fieldStatic memberPreviewTouchUpEventIdentifies the PreviewTouchUp routed event.
Public fieldStatic memberQueryContinueDragEventIdentifies the QueryContinueDrag routed event.
Public fieldStatic memberQueryCursorEventIdentifies the QueryCursor routed event.
Public fieldStatic memberStylusButtonDownEventIdentifies the StylusButtonDown routed event.
Public fieldStatic memberStylusButtonUpEventIdentifies the StylusButtonUp routed event.
Public fieldStatic memberStylusDownEventIdentifies the StylusDown routed event.
Public fieldStatic memberStylusEnterEventIdentifies the StylusEnter routed event.
Public fieldStatic memberStylusInAirMoveEventIdentifies the StylusInAirMove routed event.
Public fieldStatic memberStylusInRangeEventIdentifies the StylusInRange routed event.
Public fieldStatic memberStylusLeaveEventIdentifies the StylusLeave routed event.
Public fieldStatic memberStylusMoveEventIdentifies the StylusMove routed event.
Public fieldStatic memberStylusOutOfRangeEventIdentifies the StylusOutOfRange routed event.
Public fieldStatic memberStylusSystemGestureEventIdentifies the StylusSystemGesture routed event.
Public fieldStatic memberStylusUpEventIdentifies the StylusUp routed event.
Public fieldStatic memberTextInputEventIdentifies the TextInput routed event.
Public fieldStatic memberTouchDownEventIdentifies the TouchDown routed event.
Public fieldStatic memberTouchEnterEventIdentifies the TouchEnter routed event.
Public fieldStatic memberTouchLeaveEventIdentifies the TouchLeave routed event.
Public fieldStatic memberTouchMoveEventIdentifies the TouchMove routed event.
Public fieldStatic memberTouchUpEventIdentifies the TouchUp routed event.
Top

ContentElement defines the following common content characteristics:

  • Input: All ContentElement derived classes provide support for basic input capture from keyboard, mouse, drag-and-drop operations, stylus controls, and accelerators.

  • Focus: All ContentElement derived classes are potentially focusable. (However, the default focusable state for the ContentElement base class is false. For details on how to make a ContentElement focusable, see Focusable.) In addition, this class contains APIs that you can use for traversing the focus across related elements.

  • Events: ContentElement includes events that are related to input and focus; it also includes events for changes in state. In many cases, the ContentElement events are routed events. In some cases, routed events have both tunneling and bubbling routing strategies, raised as separate events in response to the same state or condition. Also, ContentElement defines APIs that can raise routed events and that can add or remove handlers to events.

ContentElement shares many common APIs with UIElement. These common APIs do not come from a shared class inheritance. But they do share common naming, similar behavior, and similar internal implementation of APIs in each class. The similarity is because ContentElement and UIElement are each classes that are an element base, although each has different intentions for its markup object model behavior.

In particular, UIElement descends from Visual, which provides the lower-level graphics support for rendering a ContentElement to a rectangular region within a composited window, whereas ContentElement defers rendering so that concepts more common to document scenarios, such as flow and wrapping, are more easily supported. These two related classes also implement the common interfaces IInputElement and IAnimatable.

Notes to Inheritors

The ContentElement class does not yet define all aspects of a complete content element for flow-style presentation. FrameworkContentElement is an immediately derived class of ContentElement. FrameworkContentElement includes a more complete set of additional members that support rendering a FrameworkContentElement within a content host and using the WPF framework-level layout system.

.NET Framework

Supported in: 4.5.3, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft