UIElement Class (System.Windows)

Switch View :
ScriptFree
.NET Framework Class Library
UIElement Class

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

UIElement is a base class for WPF core level implementations building on Windows Presentation Foundation (WPF) elements and basic presentation characteristics.

Inheritance Hierarchy

System.Object
  System.Windows.Threading.DispatcherObject
    System.Windows.DependencyObject
      System.Windows.Media.Visual
        System.Windows.UIElement
          System.Windows.FrameworkElement

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
Syntax

Visual Basic
<UidPropertyAttribute("Uid")> _
Public Class UIElement _
	Inherits Visual _
	Implements IAnimatable, IInputElement
C#
[UidPropertyAttribute("Uid")]
public class UIElement : Visual, IAnimatable, 
	IInputElement
Visual C++
[UidPropertyAttribute(L"Uid")]
public ref class UIElement : public Visual, 
	IAnimatable, IInputElement
F#
[<UidPropertyAttribute("Uid")>]
type UIElement =  
    class
        inherit Visual
        interface IAnimatable
        interface IInputElement
    end
XAML Object Element Usage
<UIElement .../>

The UIElement type exposes the following members.

Constructors

  Name Description
Public method UIElement Initializes a new instance of the UIElement class.
Top
Properties

  Name Description
Public property AllowDrop Gets or sets a value indicating whether this element can be used as the target of a drag-and-drop operation. This is a dependency property.
Public property AreAnyTouchesCaptured Gets a value that indicates whether at least one touch is captured to this element.
Public property AreAnyTouchesCapturedWithin Gets a value that indicates whether at least one touch is captured to this element or to any child elements in its visual tree.
Public property AreAnyTouchesDirectlyOver Gets a value that indicates whether at least one touch is pressed over this element.
Public property AreAnyTouchesOver Gets a value that indicates whether at least one touch is pressed over this element or any child elements in its visual tree.
Public property BitmapEffect Obsolete. Gets or sets a bitmap effect that applies directly to the rendered content for this element. This is a dependency property.
Public property BitmapEffectInput Obsolete. Gets or sets an input source for the bitmap effect that applies directly to the rendered content for this element. This is a dependency property.
Public property CacheMode Gets or sets a cached representation of the UIElement.
Public property Clip Gets or sets the geometry used to define the outline of the contents of an element. This is a dependency property.
Public property ClipToBounds Gets or sets a value indicating whether to clip the content of this element (or content coming from the child elements of this element) to fit into the size of the containing element. This is a dependency property.
Public property CommandBindings Gets a collection of CommandBinding objects associated with this element. A CommandBinding enables command handling for this element, and declares the linkage between a command, its events, and the handlers attached by this element.
Public property DependencyObjectType Gets the DependencyObjectType that wraps the CLR type of this instance.  (Inherited from DependencyObject.)
Public property DesiredSize Gets the size that this element computed during the measure pass of the layout process.
Public property Dispatcher Gets the Dispatcher this DispatcherObject is associated with. (Inherited from DispatcherObject.)
Public property Effect Gets or sets the bitmap effect to apply to the UIElement. This is a dependency property.
Public property Focusable Gets or sets a value that indicates whether the element can receive focus. This is a dependency property.
Public property HasAnimatedProperties Gets a value indicating whether this element has any animated properties.
Protected property HasEffectiveKeyboardFocus Gets a value that indicates whether the UIElement has focus.
Public property InputBindings Gets the collection of input bindings associated with this element.
Public property IsArrangeValid Gets a value indicating whether the computed size and position of child elements in this element's layout are valid.
Public property IsEnabled Gets or sets a value indicating whether this element is enabled in the user interface (UI). This is a dependency property.
Protected property IsEnabledCore Gets a value that becomes the return value of IsEnabled in derived classes.
Public property IsFocused Gets a value that determines whether this element has logical focus. This is a dependency property.
Public property IsHitTestVisible Gets or sets a value that declares whether this element can possibly be returned as a hit test result from some portion of its rendered content. This is a dependency property.
Public property IsInputMethodEnabled Gets a value indicating whether an input method system, such as an Input Method Editor (IME), is enabled for processing the input to this element.
Public property IsKeyboardFocused Gets a value indicating whether this element has keyboard focus. This is a dependency property.
Public property IsKeyboardFocusWithin Gets a value indicating whether keyboard focus is anywhere within the element or its visual tree child elements. This is a dependency property.
Public property IsManipulationEnabled Gets or sets a value that indicates whether manipulation events are enabled on this UIElement.
Public property IsMeasureValid Gets a value indicating whether the current size returned by layout measure is valid.
Public property IsMouseCaptured Gets a value indicating whether the mouse is captured to this element. This is a dependency property.
Public property IsMouseCaptureWithin Gets a value that determines whether mouse capture is held by this element or by child elements in its visual tree. This is a dependency property.
Public property IsMouseDirectlyOver Gets a value that indicates whether the position of the mouse pointer corresponds to hit test results, which take element compositing into account. This is a dependency property.
Public property IsMouseOver Gets a value indicating whether the mouse pointer is located over this element (including child elements in the visual tree). This is a dependency property.
Public property IsSealed Gets a value that indicates whether this instance is currently sealed (read-only). (Inherited from DependencyObject.)
Public property IsStylusCaptured Gets a value indicating whether the stylus is captured by this element. This is a dependency property.
Public property IsStylusCaptureWithin Gets a value that determines whether stylus capture is held by this element, or an element within the element bounds and its visual tree. This is a dependency property.
Public property IsStylusDirectlyOver Gets a value that indicates whether the stylus position corresponds to hit test results, which take element compositing into account. This is a dependency property.
Public property IsStylusOver Gets a value indicating whether the stylus cursor is located over this element (including visual child elements). This is a dependency property.
Public property IsVisible Gets a value indicating whether this element is visible in the user interface (UI). This is a dependency property.
Public property Opacity Gets or sets the opacity factor applied to the entire UIElement when it is rendered in the user interface (UI). This is a dependency property.
Public property OpacityMask Gets or sets an opacity mask, as a Brush implementation that is applied to any alpha-channel masking for the rendered content of this element. This is a dependency property.
Public property PersistId Obsolete. Gets a value that uniquely identifies this element.
Public property RenderSize Gets (or sets, but see Remarks) the final render size of this element.
Public property RenderTransform Gets or sets transform information that affects the rendering position of this element. This is a dependency property.
Public property RenderTransformOrigin Gets or sets the center point of any possible render transform declared by RenderTransform, relative to the bounds of the element. This is a dependency property.
Public property SnapsToDevicePixels Gets or sets a value that determines whether rendering for this element should use device-specific pixel settings during rendering. This is a dependency property.
Protected property StylusPlugIns Gets a collection of all stylus plug-in (customization) objects associated with this element.
Public property TouchesCaptured Gets all touch devices that are captured to this element.
Public property TouchesCapturedWithin Gets all touch devices that are captured to this element or any child elements in its visual tree.
Public property TouchesDirectlyOver Gets all touch devices that are over this element.
Public property TouchesOver Gets all touch devices that are over this element or any child elements in its visual tree.
Public property Uid Gets or sets the unique identifier (for localization) for this element. This is a dependency property.
Public property Visibility Gets or sets the user interface (UI) visibility of this element. This is a dependency property.
Protected property VisualBitmapEffect Obsolete. Gets or sets the BitmapEffect value for the Visual. (Inherited from Visual.)
Protected property VisualBitmapEffectInput Obsolete. Gets or sets the BitmapEffectInput value for the Visual. (Inherited from Visual.)
Protected property VisualBitmapScalingMode Gets or sets the BitmapScalingMode for the Visual. (Inherited from Visual.)
Protected property VisualCacheMode Gets or sets a cached representation of the Visual. (Inherited from Visual.)
Protected property VisualChildrenCount Gets the number of child elements for the Visual. (Inherited from Visual.)
Protected property VisualClearTypeHint Gets or sets the ClearTypeHint that determines how ClearType is rendered in the Visual. (Inherited from Visual.)
Protected property VisualClip Gets or sets the clip region of the Visual as a Geometry value. (Inherited from Visual.)
Protected property VisualEdgeMode Gets or sets the edge mode of the Visual as an EdgeMode value. (Inherited from Visual.)
Protected property VisualEffect Gets or sets the bitmap effect to apply to the Visual. (Inherited from Visual.)
Protected property VisualOffset Gets or sets the offset value of the visual object. (Inherited from Visual.)
Protected property VisualOpacity Gets or sets the opacity of the Visual. (Inherited from Visual.)
Protected property VisualOpacityMask Gets or sets the Brush value that represents the opacity mask of the Visual. (Inherited from Visual.)
Protected property VisualParent Gets the visual tree parent of the visual object. (Inherited from Visual.)
Protected property VisualScrollableAreaClip Gets or sets a clipped scrollable area for the Visual. (Inherited from Visual.)
Protected property VisualTextHintingMode Gets or sets the TextHintingMode of the Visual. (Inherited from Visual.)
Protected property VisualTextRenderingMode Gets or sets the TextRenderingMode of the Visual. (Inherited from Visual.)
Protected property VisualTransform Gets or sets the Transform value for the Visual. (Inherited from Visual.)
Protected property VisualXSnappingGuidelines Gets or sets the x-coordinate (vertical) guideline collection. (Inherited from Visual.)
Protected property VisualYSnappingGuidelines Gets or sets the y-coordinate (horizontal) guideline collection. (Inherited from Visual.)
Top
Methods

  Name Description
Public method AddHandler(RoutedEvent, Delegate) Adds a routed event handler for a specified routed event, adding the handler to the handler collection on the current element.
Public method AddHandler(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 method AddToEventRoute Adds handlers to the specified EventRoute for the current UIElement event handler collection.
Protected method AddVisualChild Defines the parent-child relationship between two visuals. (Inherited from Visual.)
Public method ApplyAnimationClock(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 method ApplyAnimationClock(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 method Arrange Positions child elements and determines a size for a UIElement. Parent elements call this method from their ArrangeCore implementation (or a WPF framework-level equivalent) to form a recursive layout update. This method constitutes the second pass of a layout update.
Protected method ArrangeCore Defines the template for WPF core-level arrange layout definition.
Public method BeginAnimation(DependencyProperty, AnimationTimeline) Starts an animation for a specified animated property on this element.
Public method BeginAnimation(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 method CaptureMouse Attempts to force capture of the mouse to this element.
Public method CaptureStylus Attempts to force capture of the stylus to this element.
Public method CaptureTouch Attempts to force capture of a touch to this element.
Public method CheckAccess Determines whether the calling thread has access to this DispatcherObject. (Inherited from DispatcherObject.)
Public method ClearValue(DependencyProperty) Clears the local value of a property. The property to be cleared is specified by a DependencyProperty identifier. (Inherited from DependencyObject.)
Public method ClearValue(DependencyPropertyKey) Clears the local value of a read-only property. The property to be cleared is specified by a DependencyPropertyKey. (Inherited from DependencyObject.)
Public method CoerceValue Coerces 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 method Equals Determines whether a provided DependencyObject is equivalent to the current DependencyObject. (Inherited from DependencyObject.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method FindCommonVisualAncestor Returns the common ancestor of two visual objects. (Inherited from Visual.)
Public method Focus Attempts to set focus to this element.
Public method GetAnimationBaseValue Returns the base property value for the specified property on this element, disregarding any possible animated value from a running or stopped animation.
Public method GetHashCode Gets a hash code for this DependencyObject. (Inherited from DependencyObject.)
Protected method GetLayoutClip Returns an alternative clipping geometry that represents the region that would be clipped if ClipToBounds were set to true.
Public method GetLocalValueEnumerator Creates a specialized enumerator for determining which dependency properties have locally set values on this DependencyObject. (Inherited from DependencyObject.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method GetUIParentCore When overridden in a derived class, returns an alternative user interface (UI) parent for this element if no visual parent exists.
Public method GetValue Returns the current effective value of a dependency property on this instance of a DependencyObject. (Inherited from DependencyObject.)
Protected method GetVisualChild Returns the specified Visual in the parent VisualCollection. (Inherited from Visual.)
Protected method HitTestCore(GeometryHitTestParameters) Implements Visual.HitTestCore to supply base element hit testing behavior (returning GeometryHitTestResult). (Overrides Visual.HitTestCore(GeometryHitTestParameters).)
Protected method HitTestCore(PointHitTestParameters) Implements HitTestCore to supply base element hit testing behavior (returning HitTestResult). (Overrides Visual.HitTestCore(PointHitTestParameters).)
Public method InputHitTest Returns the input element within the current element that is at the specified coordinates, relative to the current element's origin.
Public method InvalidateArrange Invalidates the arrange state (layout) for the element. After the invalidation, the element will have its layout updated, which will occur asynchronously unless subsequently forced by UpdateLayout.
Public method InvalidateMeasure Invalidates the measurement state (layout) for the element.
Public method InvalidateProperty Re-evaluates the effective value for the specified dependency property (Inherited from DependencyObject.)
Public method InvalidateVisual Invalidates the rendering of the element, and forces a complete new layout pass. OnRender is called after the layout cycle is completed.
Public method IsAncestorOf Determines whether the visual object is an ancestor of the descendant visual object. (Inherited from Visual.)
Public method IsDescendantOf Determines whether the visual object is a descendant of the ancestor visual object. (Inherited from Visual.)
Public method Measure Updates the DesiredSize of a UIElement. Parent elements call this method from their own MeasureCore implementations to form a recursive layout update. Calling this method constitutes the first pass (the "Measure" pass) of a layout update.
Protected method MeasureCore When overridden in a derived class, provides measurement logic for sizing this element properly, with consideration of the size of any child element content.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method MoveFocus Attempts 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 method OnAccessKey Provides class handling for when an access key that is meaningful for this element is invoked.
Protected method OnChildDesiredSizeChanged Supports layout behavior when a child element is resized.
Protected method OnCreateAutomationPeer Returns class-specific AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.
Protected method OnDragEnter Invoked 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 method OnDragLeave Invoked 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 method OnDragOver Invoked 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 method OnDrop Invoked 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 method OnGiveFeedback Invoked 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 method OnGotFocus Raises the GotFocus routed event by using the event data provided.
Protected method OnGotKeyboardFocus Invoked 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 method OnGotMouseCapture Invoked 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 method OnGotStylusCapture Invoked 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 method OnGotTouchCapture Provides class handling for the GotTouchCapture routed event that occurs when a touch is captured to this element.
Protected method OnIsKeyboardFocusedChanged Invoked when an unhandled IsKeyboardFocusedChanged event is raised on this element. Implement this method to add class handling for this event.
Protected method OnIsKeyboardFocusWithinChanged Invoked just before the IsKeyboardFocusWithinChanged event is raised by this element. Implement this method to add class handling for this event.
Protected method OnIsMouseCapturedChanged Invoked when an unhandled IsMouseCapturedChanged event is raised on this element. Implement this method to add class handling for this event.
Protected method OnIsMouseCaptureWithinChanged Invoked when an unhandled IsMouseCaptureWithinChanged event is raised on this element. Implement this method to add class handling for this event.
Protected method OnIsMouseDirectlyOverChanged Invoked when an unhandled IsMouseDirectlyOverChanged event is raised on this element. Implement this method to add class handling for this event.
Protected method OnIsStylusCapturedChanged Invoked when an unhandled IsStylusCapturedChanged event is raised on this element. Implement this method to add class handling for this event.
Protected method OnIsStylusCaptureWithinChanged Invoked when an unhandled IsStylusCaptureWithinChanged event is raised on this element. Implement this method to add class handling for this event.
Protected method OnIsStylusDirectlyOverChanged Invoked when an unhandled IsStylusDirectlyOverChanged event is raised on this element. Implement this method to add class handling for this event.
Protected method OnKeyDown Invoked 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 method OnKeyUp Invoked 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 method OnLostFocus Raises the LostFocus routed event by using the event data that is provided.
Protected method OnLostKeyboardFocus Invoked 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 method OnLostMouseCapture Invoked 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 method OnLostStylusCapture Invoked 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 method OnLostTouchCapture Provides class handling for the LostTouchCapture routed event that occurs when this element loses a touch capture.
Protected method OnManipulationBoundaryFeedback Called when the ManipulationBoundaryFeedback event occurs.
Protected method OnManipulationCompleted Called when the ManipulationCompleted event occurs.
Protected method OnManipulationDelta Called when the ManipulationDelta event occurs.
Protected method OnManipulationInertiaStarting Called when the ManipulationInertiaStarting event occurs.
Protected method OnManipulationStarted Called when the ManipulationStarted event occurs.
Protected method OnManipulationStarting Provides class handling for the ManipulationStarting routed event that occurs when the manipulation processor is first created.
Protected method OnMouseDown Invoked 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 method OnMouseEnter Invoked when an unhandled Mouse.MouseEnter attached event is raised on this element. Implement this method to add class handling for this event.
Protected method OnMouseLeave Invoked when an unhandled Mouse.MouseLeave attached event is raised on this element. Implement this method to add class handling for this event.
Protected method OnMouseLeftButtonDown Invoked when an unhandled MouseLeftButtonDown routed event is raised on this element. Implement this method to add class handling for this event.
Protected method OnMouseLeftButtonUp Invoked 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 method OnMouseMove Invoked 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 method OnMouseRightButtonDown Invoked 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 method OnMouseRightButtonUp Invoked 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 method OnMouseUp Invoked 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 method OnMouseWheel Invoked 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 method OnPreviewDragEnter Invoked 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 method OnPreviewDragLeave Invoked 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 method OnPreviewDragOver Invoked 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 method OnPreviewDrop Invoked 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 method OnPreviewGiveFeedback Invoked 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 method OnPreviewGotKeyboardFocus Invoked 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 method OnPreviewKeyDown Invoked 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 method OnPreviewKeyUp Invoked 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 method OnPreviewLostKeyboardFocus Invoked 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 method OnPreviewMouseDown Invoked 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 method OnPreviewMouseLeftButtonDown Invoked 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 method OnPreviewMouseLeftButtonUp Invoked 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 method OnPreviewMouseMove Invoked 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 method OnPreviewMouseRightButtonDown Invoked 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 method OnPreviewMouseRightButtonUp Invoked 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 method OnPreviewMouseUp Invoked 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 method OnPreviewMouseWheel Invoked 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 method OnPreviewQueryContinueDrag Invoked 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 method OnPreviewStylusButtonDown Invoked 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 method OnPreviewStylusButtonUp Invoked 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 method OnPreviewStylusDown Invoked 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 method OnPreviewStylusInAirMove Invoked 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 method OnPreviewStylusInRange Invoked 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 method OnPreviewStylusMove Invoked 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 method OnPreviewStylusOutOfRange Invoked 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 method OnPreviewStylusSystemGesture Invoked 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 method OnPreviewStylusUp Invoked 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 method OnPreviewTextInput Invoked 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 method OnPreviewTouchDown Provides class handling for the PreviewTouchDown routed event that occurs when a touch presses this element.
Protected method OnPreviewTouchMove Provides class handling for the PreviewTouchMove routed event that occurs when a touch moves while inside this element.
Protected method OnPreviewTouchUp Provides class handling for the PreviewTouchUp routed event that occurs when a touch is released inside this element.
Protected method OnPropertyChanged Invoked 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 method OnQueryContinueDrag Invoked 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 method OnQueryCursor Invoked 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 method OnRender When overridden in a derived class, participates in rendering operations that are directed by the layout system. The rendering instructions for this element are not used directly when this method is invoked, and are instead preserved for later asynchronous use by layout and drawing.
Protected method OnRenderSizeChanged When overridden in a derived class, participates in rendering operations that are directed by the layout system. This method is invoked after layout update, and before rendering, if the element's RenderSize has changed as a result of layout update.
Protected method OnStylusButtonDown Invoked 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 method OnStylusButtonUp Invoked 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 method OnStylusDown Invoked 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 method OnStylusEnter Invoked when an unhandled Stylus.StylusEnter attached event is raised by this element. Implement this method to add class handling for this event.
Protected method OnStylusInAirMove Invoked 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 method OnStylusInRange Invoked 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 method OnStylusLeave Invoked when an unhandled Stylus.StylusLeave attached event is raised by this element. Implement this method to add class handling for this event.
Protected method OnStylusMove Invoked 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 method OnStylusOutOfRange Invoked 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 method OnStylusSystemGesture Invoked 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 method OnStylusUp Invoked 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 method OnTextInput Invoked 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 method OnTouchDown Provides class handling for the TouchDown routed event that occurs when a touch presses inside this element.
Protected method OnTouchEnter Provides class handling for the TouchEnter routed event that occurs when a touch moves from outside to inside the bounds of this element.
Protected method OnTouchLeave Provides class handling for the TouchLeave routed event that occurs when a touch moves from inside to outside the bounds of this UIElement.
Protected method OnTouchMove Provides class handling for the TouchMove routed event that occurs when a touch moves while inside this element.
Protected method OnTouchUp Provides class handling for the TouchUp routed event that occurs when a touch is released inside this element.
Protected method OnVisualChildrenChanged Called when the VisualCollection of the visual object is modified. (Inherited from Visual.)
Protected method OnVisualParentChanged Invoked when the parent element of this UIElement reports a change to its underlying visual parent. (Overrides Visual.OnVisualParentChanged(DependencyObject).)
Public method PointFromScreen Converts a Point in screen coordinates into a Point that represents the current coordinate system of the Visual. (Inherited from Visual.)
Public method PointToScreen Converts a Point that represents the current coordinate system of the Visual into a Point in screen coordinates. (Inherited from Visual.)
Public method PredictFocus When 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 method RaiseEvent Raises 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 method ReadLocalValue Returns the local value of a dependency property, if it exists. (Inherited from DependencyObject.)
Public method ReleaseAllTouchCaptures Releases all captured touch devices from this element.
Public method ReleaseMouseCapture Releases the mouse capture, if this element held the capture.
Public method ReleaseStylusCapture Releases the stylus device capture, if this element held the capture.
Public method ReleaseTouchCapture Attempts to release the specified touch device from this element.
Public method RemoveHandler Removes the specified routed event handler from this element.
Protected method RemoveVisualChild Removes the parent-child relationship between two visuals. (Inherited from Visual.)
Public method SetCurrentValue Sets the value of a dependency property without changing its value source. (Inherited from DependencyObject.)
Public method SetValue(DependencyProperty, Object) Sets the local value of a dependency property, specified by its dependency property identifier. (Inherited from DependencyObject.)
Public method SetValue(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 method ShouldSerializeCommandBindings Returns whether serialization processes should serialize the contents of the CommandBindings property on instances of this class.
Public method ShouldSerializeInputBindings Returns whether serialization processes should serialize the contents of the InputBindings property on instances of this class.
Protected method ShouldSerializeProperty Returns a value that indicates whether serialization processes should serialize the value for the provided dependency property. (Inherited from DependencyObject.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method TransformToAncestor(Visual) Returns a transform that can be used to transform coordinates from the Visual to the specified Visual ancestor of the visual object. (Inherited from Visual.)
Public method TransformToAncestor(Visual3D) Returns a transform that can be used to transform coordinates from the Visual to the specified Visual3D ancestor of the visual object. (Inherited from Visual.)
Public method TransformToDescendant Returns a transform that can be used to transform coordinates from the Visual to the specified visual object descendant. (Inherited from Visual.)
Public method TransformToVisual Returns a transform that can be used to transform coordinates from the Visual to the specified visual object. (Inherited from Visual.)
Public method TranslatePoint Translates a point relative to this element to coordinates that are relative to the specified element.
Public method UpdateLayout Ensures that all visual child elements of this element are properly updated for layout.
Public method VerifyAccess Enforces that the calling thread has access to this DispatcherObject. (Inherited from DispatcherObject.)
Top
Events

  Name Description
Public event DragEnter Occurs when the input system reports an underlying drag event with this element as the drag target.
Public event DragLeave Occurs when the input system reports an underlying drag event with this element as the drag origin.
Public event DragOver Occurs when the input system reports an underlying drag event with this element as the potential drop target.
Public event Drop Occurs when the input system reports an underlying drop event with this element as the drop target.
Public event FocusableChanged Occurs when the value of the Focusable property changes.
Public event GiveFeedback Occurs when the input system reports an underlying drag-and-drop event that involves this element.
Public event GotFocus Occurs when this element gets logical focus.
Public event GotKeyboardFocus Occurs when the keyboard is focused on this element.
Public event GotMouseCapture Occurs when this element captures the mouse.
Public event GotStylusCapture Occurs when this element captures the stylus.
Public event GotTouchCapture Occurs when a touch is captured to this element.
Public event IsEnabledChanged Occurs when the value of the IsEnabled property on this element changes.
Public event IsHitTestVisibleChanged Occurs when the value of the IsHitTestVisible dependency property changes on this element.
Public event IsKeyboardFocusedChanged Occurs when the value of the IsKeyboardFocused property changes on this element.
Public event IsKeyboardFocusWithinChanged Occurs when the value of the IsKeyboardFocusWithinChanged property changes on this element.
Public event IsMouseCapturedChanged Occurs when the value of the IsMouseCaptured property changes on this element.
Public event IsMouseCaptureWithinChanged Occurs when the value of the IsMouseCaptureWithinProperty changes on this element.
Public event IsMouseDirectlyOverChanged Occurs when the value of the IsMouseDirectlyOver property changes on this element.
Public event IsStylusCapturedChanged Occurs when the value of the IsStylusCaptured property changes on this element.
Public event IsStylusCaptureWithinChanged Occurs when the value of the IsStylusCaptureWithin property changes on this element.
Public event IsStylusDirectlyOverChanged Occurs when the value of the IsStylusDirectlyOver property changes on this element.
Public event IsVisibleChanged Occurs when the value of the IsVisible property changes on this element.
Public event KeyDown Occurs when a key is pressed while focus is on this element.
Public event KeyUp Occurs when a key is released while focus is on this element.
Public event LayoutUpdated Occurs when the layout of the various visual elements associated with the current Dispatcher changes.
Public event LostFocus Occurs when this element loses logical focus.
Public event LostKeyboardFocus Occurs when the keyboard is no longer focused on this element,.
Public event LostMouseCapture Occurs when this element loses mouse capture.
Public event LostStylusCapture Occurs when this element loses stylus capture.
Public event LostTouchCapture Occurs when this element loses a touch capture.
Public event ManipulationBoundaryFeedback Occurs when the manipulation encounters a boundary.
Public event ManipulationCompleted Occurs when a manipulation and inertia on the UIElement object is complete.
Public event ManipulationDelta Occurs when the input device changes position during a manipulation.
Public event ManipulationInertiaStarting Occurs when the input device loses contact with the UIElement object during a manipulation and inertia begins.
Public event ManipulationStarted Occurs when an input device begins a manipulation on the UIElement object.
Public event ManipulationStarting Occurs when the manipulation processor is first created.
Public event MouseDown Occurs when any mouse button is pressed while the pointer is over this element.
Public event MouseEnter Occurs when the mouse pointer enters the bounds of this element.
Public event MouseLeave Occurs when the mouse pointer leaves the bounds of this element.
Public event MouseLeftButtonDown Occurs when the left mouse button is pressed while the mouse pointer is over this element.
Public event MouseLeftButtonUp Occurs when the left mouse button is released while the mouse pointer is over this element.
Public event MouseMove Occurs when the mouse pointer moves while over this element.
Public event MouseRightButtonDown Occurs when the right mouse button is pressed while the mouse pointer is over this element.
Public event MouseRightButtonUp Occurs when the right mouse button is released while the mouse pointer is over this element.
Public event MouseUp Occurs when any mouse button is released over this element.
Public event MouseWheel Occurs when the user rotates the mouse wheel while the mouse pointer is over this element.
Public event PreviewDragEnter Occurs when the input system reports an underlying drag event with this element as the drag target.
Public event PreviewDragLeave Occurs when the input system reports an underlying drag event with this element as the drag origin.
Public event PreviewDragOver Occurs when the input system reports an underlying drag event with this element as the potential drop target.
Public event PreviewDrop Occurs when the input system reports an underlying drop event with this element as the drop target.
Public event PreviewGiveFeedback Occurs when a drag-and-drop operation is started.
Public event PreviewGotKeyboardFocus Occurs when the keyboard is focused on this element.
Public event PreviewKeyDown Occurs when a key is pressed while focus is on this element.
Public event PreviewKeyUp Occurs when a key is released while focus is on this element.
Public event PreviewLostKeyboardFocus Occurs when the keyboard is no longer focused on this element.
Public event PreviewMouseDown Occurs when any mouse button is pressed while the pointer is over this element.
Public event PreviewMouseLeftButtonDown Occurs when the left mouse button is pressed while the mouse pointer is over this element.
Public event PreviewMouseLeftButtonUp Occurs when the left mouse button is released while the mouse pointer is over this element.
Public event PreviewMouseMove Occurs when the mouse pointer moves while the mouse pointer is over this element.
Public event PreviewMouseRightButtonDown Occurs when the right mouse button is pressed while the mouse pointer is over this element.
Public event PreviewMouseRightButtonUp Occurs when the right mouse button is released while the mouse pointer is over this element.
Public event PreviewMouseUp Occurs when any mouse button is released while the mouse pointer is over this element.
Public event PreviewMouseWheel Occurs when the user rotates the mouse wheel while the mouse pointer is over this element.
Public event PreviewQueryContinueDrag Occurs when there is a change in the keyboard or mouse button state during a drag-and-drop operation.
Public event PreviewStylusButtonDown Occurs when the stylus button is pressed while the pointer is over this element.
Public event PreviewStylusButtonUp Occurs when the stylus button is released while the pointer is over this element.
Public event PreviewStylusDown Occurs when the stylus touches the digitizer while it is over this element.
Public event PreviewStylusInAirMove Occurs when the stylus moves over an element without actually touching the digitizer.
Public event PreviewStylusInRange Occurs when the stylus is close enough to the digitizer to be detected, while over this element.
Public event PreviewStylusMove Occurs 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 event PreviewStylusOutOfRange Occurs when the stylus is too far from the digitizer to be detected.
Public event PreviewStylusSystemGesture Occurs when a user performs one of several stylus gestures.
Public event PreviewStylusUp Occurs when the user raises the stylus off the digitizer while the stylus is over this element.
Public event PreviewTextInput Occurs when this element gets text in a device-independent manner.
Public event PreviewTouchDown Occurs when a finger touches the screen while the finger is over this element.
Public event PreviewTouchMove Occurs when a finger moves on the screen while the finger is over this element.
Public event PreviewTouchUp Occurs when a finger is raised off of the screen while the finger is over this element.
Public event QueryContinueDrag Occurs when there is a change in the keyboard or mouse button state during a drag-and-drop operation.
Public event QueryCursor Occurs 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 event StylusButtonDown Occurs when the stylus button is pressed while the pointer is over this element.
Public event StylusButtonUp Occurs when the stylus button is released while the pointer is over this element.
Public event StylusDown Occurs when the stylus touches the digitizer while the stylus is over this element.
Public event StylusEnter Occurs when the stylus enters the bounds of this element.
Public event StylusInAirMove Occurs when the stylus moves over an element without actually touching the digitizer.
Public event StylusInRange Occurs when the stylus is close enough to the digitizer to be detected, while over this element.
Public event StylusLeave Occurs when the stylus leaves the bounds of the element.
Public event StylusMove Occurs 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 event StylusOutOfRange Occurs when the stylus is too far from the digitizer to be detected, while over this element.
Public event StylusSystemGesture Occurs when a user performs one of several stylus gestures.
Public event StylusUp Occurs when the user raises the stylus off the digitizer while it is over this element.
Public event TextInput Occurs when this element gets text in a device-independent manner.
Public event TouchDown Occurs when a finger touches the screen while the finger is over this element.
Public event TouchEnter Occurs when a touch moves from outside to inside the bounds of this element.
Public event TouchLeave Occurs when a touch moves from inside to outside the bounds of this element.
Public event TouchMove Occurs when a finger moves on the screen while the finger is over this element.
Public event TouchUp Occurs when a finger is raised off of the screen while the finger is over this element.
Top
Fields

  Name Description
Public field Static member AllowDropProperty Identifies the AllowDrop dependency property.
Public field Static member AreAnyTouchesCapturedProperty Identifies the AreAnyTouchesCaptured dependency property.
Public field Static member AreAnyTouchesCapturedWithinProperty Identifies the AreAnyTouchesCapturedWithin dependency property.
Public field Static member AreAnyTouchesDirectlyOverProperty Identifies the AreAnyTouchesDirectlyOver dependency property.
Public field Static member AreAnyTouchesOverProperty Identifies the AreAnyTouchesOver dependency property.
Public field Static member BitmapEffectInputProperty Identifies the BitmapEffectInput dependency property.
Public field Static member BitmapEffectProperty Identifies the BitmapEffect dependency property.
Public field Static member CacheModeProperty Identifies the CacheMode dependency property.
Public field Static member ClipProperty Identifies the Clip dependency property.
Public field Static member ClipToBoundsProperty Identifies the ClipToBounds dependency property.
Public field Static member DragEnterEvent Identifies the DragEnter routed event.
Public field Static member DragLeaveEvent Identifies the DragLeave routed event.
Public field Static member DragOverEvent Identifies the DragOver routed event.
Public field Static member DropEvent Identifies the Drop routed event.
Public field Static member EffectProperty Identifies the Effect dependency property.
Public field Static member FocusableProperty Identifies the Focusable dependency property.
Public field Static member GiveFeedbackEvent Identifies the GiveFeedback routed event.
Public field Static member GotFocusEvent Identifies the GotFocus routed event.
Public field Static member GotKeyboardFocusEvent Identifies the GotKeyboardFocus routed event.
Public field Static member GotMouseCaptureEvent Identifies the GotMouseCapture routed event.
Public field Static member GotStylusCaptureEvent Identifies the GotStylusCapture routed event.
Public field Static member GotTouchCaptureEvent Identifies the GotTouchCapture routed event.
Public field Static member IsEnabledProperty Identifies the IsEnabled dependency property.
Public field Static member IsFocusedProperty Identifies the IsFocused dependency property.
Public field Static member IsHitTestVisibleProperty Identifies the IsHitTestVisible  dependency property.
Public field Static member IsKeyboardFocusedProperty Identifies the IsKeyboardFocused dependency property.
Public field Static member IsKeyboardFocusWithinProperty Identifies the IsKeyboardFocusWithin dependency property.
Public field Static member IsManipulationEnabledProperty Identifies the IsManipulationEnabled dependency property.
Public field Static member IsMouseCapturedProperty Identifies the IsMouseCaptured dependency property.
Public field Static member IsMouseCaptureWithinProperty Identifies the IsMouseCaptureWithin dependency property.
Public field Static member IsMouseDirectlyOverProperty Identifies the IsMouseDirectlyOver dependency property.
Public field Static member IsMouseOverProperty Identifies the IsMouseOver dependency property.
Public field Static member IsStylusCapturedProperty Identifies the IsStylusCaptured dependency property.
Public field Static member IsStylusCaptureWithinProperty Identifies the IsStylusCaptureWithin dependency property.
Public field Static member IsStylusDirectlyOverProperty Identifies the IsStylusDirectlyOver dependency property.
Public field Static member IsStylusOverProperty Identifies the IsStylusOver dependency property.
Public field Static member IsVisibleProperty Identifies the IsVisible dependency property.
Public field Static member KeyDownEvent Identifies the KeyDown routed event.
Public field Static member KeyUpEvent Identifies the KeyUp routed event.
Public field Static member LostFocusEvent Identifies the LostFocus routed event.
Public field Static member LostKeyboardFocusEvent Identifies the LostKeyboardFocus routed event.
Public field Static member LostMouseCaptureEvent Identifies the LostMouseCapture routed event.
Public field Static member LostStylusCaptureEvent Identifies the LostStylusCapture routed event.
Public field Static member LostTouchCaptureEvent Identifies the LostTouchCapture routed event.
Public field Static member ManipulationBoundaryFeedbackEvent Identifies the ManipulationBoundaryFeedback event.
Public field Static member ManipulationCompletedEvent Identifies the ManipulationCompleted routed event.
Public field Static member ManipulationDeltaEvent Identifies the ManipulationDelta routed event.
Public field Static member ManipulationInertiaStartingEvent Identifies the ManipulationInertiaStarting routed event.
Public field Static member ManipulationStartedEvent Identifies the ManipulationStarted routed event.
Public field Static member ManipulationStartingEvent Identifies the ManipulationStarting routed event.
Public field Static member MouseDownEvent Identifies the MouseDown routed event.
Public field Static member MouseEnterEvent Identifies the MouseEnter routed event.
Public field Static member MouseLeaveEvent Identifies the MouseLeave routed event.
Public field Static member MouseLeftButtonDownEvent Identifies the MouseLeftButtonDown routed event.
Public field Static member MouseLeftButtonUpEvent Identifies the MouseLeftButtonUp routed event.
Public field Static member MouseMoveEvent Identifies the MouseMove routed event.
Public field Static member MouseRightButtonDownEvent Identifies the MouseRightButtonDown routed event.
Public field Static member MouseRightButtonUpEvent Identifies the MouseRightButtonUp routed event.
Public field Static member MouseUpEvent Identifies the MouseUp routed event.
Public field Static member MouseWheelEvent Identifies the MouseWheel routed event.
Public field Static member OpacityMaskProperty Identifies the OpacityMask dependency property.
Public field Static member OpacityProperty Identifies the Opacity dependency property.
Public field Static member PreviewDragEnterEvent Identifies the PreviewDragEnter routed event.
Public field Static member PreviewDragLeaveEvent Identifies the PreviewDragLeave routed event.
Public field Static member PreviewDragOverEvent Identifies the PreviewDragOver routed event.
Public field Static member PreviewDropEvent Identifies the PreviewDrop routed event.
Public field Static member PreviewGiveFeedbackEvent Identifies the PreviewGiveFeedback routed event.
Public field Static member PreviewGotKeyboardFocusEvent Identifies the PreviewGotKeyboardFocus routed event.
Public field Static member PreviewKeyDownEvent Identifies the PreviewKeyDown routed event.
Public field Static member PreviewKeyUpEvent Identifies the PreviewKeyUp routed event.
Public field Static member PreviewLostKeyboardFocusEvent Identifies the PreviewLostKeyboardFocus routed event.
Public field Static member PreviewMouseDownEvent Identifies the PreviewMouseDown routed event.
Public field Static member PreviewMouseLeftButtonDownEvent Identifies the PreviewMouseLeftButtonDown routed event.
Public field Static member PreviewMouseLeftButtonUpEvent Identifies the PreviewMouseLeftButtonUp routed event.
Public field Static member PreviewMouseMoveEvent Identifies the PreviewMouseMove routed event.
Public field Static member PreviewMouseRightButtonDownEvent Identifies the PreviewMouseRightButtonDown routed event.
Public field Static member PreviewMouseRightButtonUpEvent Identifies the PreviewMouseRightButtonUp routed event.
Public field Static member PreviewMouseUpEvent Identifies the PreviewMouseUp routed event.
Public field Static member PreviewMouseWheelEvent Identifies the PreviewMouseWheel routed event.
Public field Static member PreviewQueryContinueDragEvent Identifies the PreviewQueryContinueDrag routed event.
Public field Static member PreviewStylusButtonDownEvent Identifies the PreviewStylusButtonDown routed event.
Public field Static member PreviewStylusButtonUpEvent Identifies the PreviewStylusButtonUp routed event.
Public field Static member PreviewStylusDownEvent Identifies the PreviewStylusDown routed event.
Public field Static member PreviewStylusInAirMoveEvent Identifies the PreviewStylusInAirMove routed event.
Public field Static member PreviewStylusInRangeEvent Identifies the PreviewStylusInRange routed event.
Public field Static member PreviewStylusMoveEvent Identifies the PreviewStylusMove routed event.
Public field Static member PreviewStylusOutOfRangeEvent Identifies the PreviewStylusOutOfRange routed event.
Public field Static member PreviewStylusSystemGestureEvent Identifies the PreviewStylusSystemGesture routed event.
Public field Static member PreviewStylusUpEvent Identifies the PreviewStylusUp routed event.
Public field Static member PreviewTextInputEvent Identifies the PreviewTextInput routed event.
Public field Static member PreviewTouchDownEvent Identifies the PreviewTouchDown routed event.
Public field Static member PreviewTouchMoveEvent Identifies the PreviewTouchMove routed event.
Public field Static member PreviewTouchUpEvent Identifies the PreviewTouchUp routed event.
Public field Static member QueryContinueDragEvent Identifies the QueryContinueDrag routed event.
Public field Static member QueryCursorEvent Identifies the QueryCursor routed event.
Public field Static member RenderTransformOriginProperty Identifies the RenderTransformOrigin dependency property.
Public field Static member RenderTransformProperty Identifies the RenderTransform dependency property.
Public field Static member SnapsToDevicePixelsProperty Identifies the SnapsToDevicePixels dependency property.
Public field Static member StylusButtonDownEvent Identifies the StylusButtonDown routed event.
Public field Static member StylusButtonUpEvent Identifies the StylusButtonUp routed event.
Public field Static member StylusDownEvent Identifies the StylusDown routed event.
Public field Static member StylusEnterEvent Identifies the StylusEnter routed event.
Public field Static member StylusInAirMoveEvent Identifies the StylusInAirMove routed event.
Public field Static member StylusInRangeEvent Identifies the StylusInRange routed event.
Public field Static member StylusLeaveEvent Identifies the StylusLeave routed event.
Public field Static member StylusMoveEvent Identifies the StylusMove routed event.
Public field Static member StylusOutOfRangeEvent Identifies the StylusOutOfRange routed event.
Public field Static member StylusSystemGestureEvent Identifies the StylusSystemGesture routed event.
Public field Static member StylusUpEvent Identifies the StylusUp routed event.
Public field Static member TextInputEvent Identifies the TextInput routed event.
Public field Static member TouchDownEvent Identifies the TouchDown routed event.
Public field Static member TouchEnterEvent Identifies the TouchEnter routed event.
Public field Static member TouchLeaveEvent Identifies the TouchLeave routed event.
Public field Static member TouchMoveEvent Identifies the TouchMove routed event.
Public field Static member TouchUpEvent Identifies the TouchUp routed event.
Public field Static member UidProperty Identifies the Uid dependency property.
Public field Static member VisibilityProperty Identifies the Visibility dependency property.
Top
Remarks

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

UIElement 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, UIElement can be considered roughly equivalent to a window handle in Win32 programming, or an Element in Dynamic HTML (DHTML) programming. UIElement is a base element at the WPF core level.

A UIElement has the following capabilities that are specifically defined by the UIElement class:

  • Can render as a child element (UIElement derives from Visual, a high level graphics class)

  • Contains logic that is used to size and position possible child elements of a UIElement (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 UIElement, 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

  • Style support

  • Further animation support

Another related class is ContentElement. The ContentElement class implements many of the same members as does UIElement; the difference between these two classes has to do with their intended place in the overall content model. A UIElement 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 UIElement, 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.

Important note Important

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.

Version Information

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Platforms

Windows 8 Consumer Preview, Windows Server 8 Beta, Windows 7, Windows Server 2008 SP2, 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.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also

Reference

Other Resources