UIElement Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
UIElement is a base class for WPF core level implementations building on Windows Presentation Foundation (WPF) elements and basic presentation characteristics.
public ref class UIElement : System::Windows::Media::Visual, System::Windows::IInputElement, System::Windows::Media::Animation::IAnimatable
[System.Windows.Markup.UidProperty("Uid")]
public class UIElement : System.Windows.Media.Visual, System.Windows.IInputElement, System.Windows.Media.Animation.IAnimatable
[<System.Windows.Markup.UidProperty("Uid")>]
type UIElement = class
inherit Visual
interface IAnimatable
interface IInputElement
[<System.Windows.Markup.UidProperty("Uid")>]
type UIElement = class
inherit Visual
interface IInputElement
interface IAnimatable
Public Class UIElement
Inherits Visual
Implements IAnimatable, IInputElement
- Inheritance
- Derived
- Attributes
- Implements
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
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.
Constructors
UIElement() |
Initializes a new instance of the UIElement class. |
Fields
Properties
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. |
AreAnyTouchesCaptured |
Gets a value that indicates whether at least one touch is captured to this element. |
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. |
AreAnyTouchesDirectlyOver |
Gets a value that indicates whether at least one touch is pressed over this element. |
AreAnyTouchesOver |
Gets a value that indicates whether at least one touch is pressed over this element or any child elements in its visual tree. |
BitmapEffect |
Obsolete.
Obsolete.
Gets or sets a bitmap effect that applies directly to the rendered content for this element. This is a dependency property. |
BitmapEffectInput |
Obsolete.
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. |
CacheMode |
Gets or sets a cached representation of the UIElement. |
Clip |
Gets or sets the geometry used to define the outline of the contents of an element. This is a dependency 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. |
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. |
DependencyObjectType |
Gets the DependencyObjectType that wraps the CLR type of this instance. (Inherited from DependencyObject) |
DesiredSize |
Gets the size that this element computed during the measure pass of the layout process. |
Dispatcher |
Gets the Dispatcher this DispatcherObject is associated with. (Inherited from DispatcherObject) |
Effect |
Gets or sets the bitmap effect to apply to the UIElement. This is a dependency property. |
Focusable |
Gets or sets a value that indicates whether the element can receive focus. This is a dependency property. |
HasAnimatedProperties |
Gets a value indicating whether this element has any animated properties. |
HasEffectiveKeyboardFocus |
Gets a value that indicates whether the UIElement has focus. |
InputBindings |
Gets the collection of input bindings associated with this element. |
IsArrangeValid |
Gets a value indicating whether the computed size and position of child elements in this element's layout are valid. |
IsEnabled |
Gets or sets a value indicating whether this element is enabled in the user interface (UI). This is a dependency property. |
IsEnabledCore |
Gets a value that becomes the return value of IsEnabled in derived classes. |
IsFocused |
Gets a value that determines whether this element has logical focus. This is a dependency 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. |
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. |
IsKeyboardFocused |
Gets a value indicating whether this element has keyboard focus. This is a dependency 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. |
IsManipulationEnabled |
Gets or sets a value that indicates whether manipulation events are enabled on this UIElement. |
IsMeasureValid |
Gets a value indicating whether the current size returned by layout measure is valid. |
IsMouseCaptured |
Gets a value indicating whether the mouse is captured to this element. This is a dependency 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. |
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. |
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. |
IsSealed |
Gets a value that indicates whether this instance is currently sealed (read-only). (Inherited from DependencyObject) |
IsStylusCaptured |
Gets a value indicating whether the stylus is captured by this element. This is a dependency 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. |
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. |
IsStylusOver |
Gets a value indicating whether the stylus cursor is located over this element (including visual child elements). This is a dependency property. |
IsVisible |
Gets a value indicating whether this element is visible in the user interface (UI). This is a dependency 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. |
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. |
PersistId |
Obsolete.
Gets a value that uniquely identifies this element. |
RenderSize |
Gets (or sets) the final render size of this element. |
RenderTransform |
Gets or sets transform information that affects the rendering position of this element. This is a dependency 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. |
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. |
StylusPlugIns |
Gets a collection of all stylus plug-in (customization) objects associated with this element. |
TouchesCaptured |
Gets all touch devices that are captured to this element. |
TouchesCapturedWithin |
Gets all touch devices that are captured to this element or any child elements in its visual tree. |
TouchesDirectlyOver |
Gets all touch devices that are over this element. |
TouchesOver |
Gets all touch devices that are over this element or any child elements in its visual tree. |
Uid |
Gets or sets the unique identifier (for localization) for this element. This is a dependency property. |
Visibility |
Gets or sets the user interface (UI) visibility of this element. This is a dependency property. |
VisualBitmapEffect |
Obsolete.
Obsolete.
Gets or sets the BitmapEffect value for the Visual. (Inherited from Visual) |
VisualBitmapEffectInput |
Obsolete.
Obsolete.
Gets or sets the BitmapEffectInput value for the Visual. (Inherited from Visual) |
VisualBitmapScalingMode |
Gets or sets the BitmapScalingMode for the Visual. (Inherited from Visual) |
VisualCacheMode |
Gets or sets a cached representation of the Visual. (Inherited from Visual) |
VisualChildrenCount |
Gets the number of child elements for the Visual. (Inherited from Visual) |
VisualClearTypeHint |
Gets or sets the ClearTypeHint that determines how ClearType is rendered in the Visual. (Inherited from Visual) |
VisualClip |
Gets or sets the clip region of the Visual as a Geometry value. (Inherited from Visual) |
VisualEdgeMode |
Gets or sets the edge mode of the Visual as an EdgeMode value. (Inherited from Visual) |
VisualEffect |
Gets or sets the bitmap effect to apply to the Visual. (Inherited from Visual) |
VisualOffset |
Gets or sets the offset value of the visual object. (Inherited from Visual) |
VisualOpacity |
Gets or sets the opacity of the Visual. (Inherited from Visual) |
VisualOpacityMask |
Gets or sets the Brush value that represents the opacity mask of the Visual. (Inherited from Visual) |
VisualParent |
Gets the visual tree parent of the visual object. (Inherited from Visual) |
VisualScrollableAreaClip |
Gets or sets a clipped scrollable area for the Visual. (Inherited from Visual) |
VisualTextHintingMode |
Gets or sets the TextHintingMode of the Visual. (Inherited from Visual) |
VisualTextRenderingMode |
Gets or sets the TextRenderingMode of the Visual. (Inherited from Visual) |
VisualTransform |
Gets or sets the Transform value for the Visual. (Inherited from Visual) |
VisualXSnappingGuidelines |
Gets or sets the x-coordinate (vertical) guideline collection. (Inherited from Visual) |
VisualYSnappingGuidelines |
Gets or sets the y-coordinate (horizontal) guideline collection. (Inherited from Visual) |
Methods
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 |
AddHandler(RoutedEvent, Delegate) |
Adds a routed event handler for a specified routed event, adding the handler to the handler collection on the current element. |
AddToEventRoute(EventRoute, RoutedEventArgs) |
Adds handlers to the specified EventRoute for the current UIElement event handler collection. |
AddVisualChild(Visual) |
Defines the parent-child relationship between two visuals. (Inherited from Visual) |
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. |
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. |
Arrange(Rect) |
Positions child elements and determines a size for a UIElement. Parent elements call this method from their ArrangeCore(Rect) implementation (or a WPF framework-level equivalent) to form a recursive layout update. This method constitutes the second pass of a layout update. |
ArrangeCore(Rect) |
Defines the template for WPF core-level arrange layout definition. |
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. |
BeginAnimation(DependencyProperty, AnimationTimeline) |
Starts an animation for a specified animated property on this element. |
CaptureMouse() |
Attempts to force capture of the mouse to this element. |
CaptureStylus() |
Attempts to force capture of the stylus to this element. |
CaptureTouch(TouchDevice) |
Attempts to force capture of a touch to this element. |
CheckAccess() |
Determines whether the calling thread has access to this DispatcherObject. (Inherited from DispatcherObject) |
ClearValue(DependencyProperty) |
Clears the local value of a property. The property to be cleared is specified by a DependencyProperty identifier. (Inherited from DependencyObject) |
ClearValue(DependencyPropertyKey) |
Clears the local value of a read-only property. The property to be cleared is specified by a DependencyPropertyKey. (Inherited from DependencyObject) |
CoerceValue(DependencyProperty) |
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) |
Equals(Object) |
Determines whether a provided DependencyObject is equivalent to the current DependencyObject. (Inherited from DependencyObject) |
FindCommonVisualAncestor(DependencyObject) |
Returns the common ancestor of two visual objects. (Inherited from Visual) |
Focus() |
Attempts to set focus to this element. |
GetAnimationBaseValue(DependencyProperty) |
Returns the base property value for the specified property on this element, disregarding any possible animated value from a running or stopped animation. |
GetHashCode() |
Gets a hash code for this DependencyObject. (Inherited from DependencyObject) |
GetLayoutClip(Size) |
Returns an alternative clipping geometry that represents the region that would be clipped if ClipToBounds were set to |
GetLocalValueEnumerator() |
Creates a specialized enumerator for determining which dependency properties have locally set values on this DependencyObject. (Inherited from DependencyObject) |
GetType() |
Gets the Type of the current instance. (Inherited from Object) |
GetUIParentCore() |
When overridden in a derived class, returns an alternative user interface (UI) parent for this element if no visual parent exists. |
GetValue(DependencyProperty) |
Returns the current effective value of a dependency property on this instance of a DependencyObject. (Inherited from DependencyObject) |
GetVisualChild(Int32) |
Returns the specified Visual in the parent VisualCollection. (Inherited from Visual) |
HitTestCore(GeometryHitTestParameters) |
Implements HitTestCore(GeometryHitTestParameters) to supply base element hit testing behavior (returning GeometryHitTestResult). |
HitTestCore(PointHitTestParameters) |
Implements HitTestCore(PointHitTestParameters) to supply base element hit testing behavior (returning HitTestResult). |
InputHitTest(Point) |
Returns the input element within the current element that is at the specified coordinates, relative to the current element's origin. |
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(). |
InvalidateMeasure() |
Invalidates the measurement state (layout) for the element. |
InvalidateProperty(DependencyProperty) |
Re-evaluates the effective value for the specified dependency property. (Inherited from DependencyObject) |
InvalidateVisual() |
Invalidates the rendering of the element, and forces a complete new layout pass. OnRender(DrawingContext) is called after the layout cycle is completed. |
IsAncestorOf(DependencyObject) |
Determines whether the visual object is an ancestor of the descendant visual object. (Inherited from Visual) |
IsDescendantOf(DependencyObject) |
Determines whether the visual object is a descendant of the ancestor visual object. (Inherited from Visual) |
Measure(Size) |
Updates the DesiredSize of a UIElement. Parent elements call this method from their own MeasureCore(Size) implementations to form a recursive layout update. Calling this method constitutes the first pass (the "Measure" pass) of a layout update. |
MeasureCore(Size) |
When overridden in a derived class, provides measurement logic for sizing this element properly, with consideration of the size of any child element content. |
MemberwiseClone() |
Creates a shallow copy of the current Object. (Inherited from Object) |
MoveFocus(TraversalRequest) |
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. |
OnAccessKey(AccessKeyEventArgs) |
Provides class handling for when an access key that is meaningful for this element is invoked. |
OnChildDesiredSizeChanged(UIElement) |
Supports layout behavior when a child element is resized. |
OnCreateAutomationPeer() |
Returns class-specific AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure. |
OnDpiChanged(DpiScale, DpiScale) |
Called when the DPI at which this View is rendered changes. (Inherited from Visual) |
OnDragEnter(DragEventArgs) |
Invoked when an unhandled 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. |
OnDragLeave(DragEventArgs) |
Invoked when an unhandled 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. |
OnDragOver(DragEventArgs) |
Invoked when an unhandled 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. |
OnDrop(DragEventArgs) |
Invoked when an unhandled 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. |
OnGiveFeedback(GiveFeedbackEventArgs) |
Invoked when an unhandled 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. |
OnGotFocus(RoutedEventArgs) |
Raises the GotFocus routed event by using the event data provided. |
OnGotKeyboardFocus(KeyboardFocusChangedEventArgs) |
Invoked when an unhandled 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. |
OnGotMouseCapture(MouseEventArgs) |
Invoked when an unhandled 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. |
OnGotStylusCapture(StylusEventArgs) |
Invoked when an unhandled 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. |
OnGotTouchCapture(TouchEventArgs) |
Provides class handling for the GotTouchCapture routed event that occurs when a touch is captured to this element. |
OnIsKeyboardFocusedChanged(DependencyPropertyChangedEventArgs) |
Invoked when an unhandled IsKeyboardFocusedChanged event is raised on this element. Implement this method to add class handling for this event. |
OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs) |
Invoked just before the IsKeyboardFocusWithinChanged event is raised by this element. Implement this method to add class handling for this event. |
OnIsMouseCapturedChanged(DependencyPropertyChangedEventArgs) |
Invoked when an unhandled IsMouseCapturedChanged event is raised on this element. Implement this method to add class handling for this event. |
OnIsMouseCaptureWithinChanged(DependencyPropertyChangedEventArgs) |
Invoked when an unhandled IsMouseCaptureWithinChanged event is raised on this element. Implement this method to add class handling for this event. |
OnIsMouseDirectlyOverChanged(DependencyPropertyChangedEventArgs) |
Invoked when an unhandled IsMouseDirectlyOverChanged event is raised on this element. Implement this method to add class handling for this event. |
OnIsStylusCapturedChanged(DependencyPropertyChangedEventArgs) |
Invoked when an unhandled IsStylusCapturedChanged event is raised on this element. Implement this method to add class handling for this event. |
OnIsStylusCaptureWithinChanged(DependencyPropertyChangedEventArgs) |
Invoked when an unhandled IsStylusCaptureWithinChanged event is raised on this element. Implement this method to add class handling for this event. |
OnIsStylusDirectlyOverChanged(DependencyPropertyChangedEventArgs) |
Invoked when an unhandled IsStylusDirectlyOverChanged event is raised on this element. Implement this method to add class handling for this event. |
OnKeyDown(KeyEventArgs) |
Invoked when an unhandled 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. |
OnKeyUp(KeyEventArgs) |
Invoked when an unhandled 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. |
OnLostFocus(RoutedEventArgs) |
Raises the LostFocus routed event by using the event data that is provided. |
OnLostKeyboardFocus(KeyboardFocusChangedEventArgs) |
Invoked when an unhandled 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. |
OnLostMouseCapture(MouseEventArgs) |
Invoked when an unhandled 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. |
OnLostStylusCapture(StylusEventArgs) |
Invoked when an unhandled 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. |
OnLostTouchCapture(TouchEventArgs) |
Provides class handling for the LostTouchCapture routed event that occurs when this element loses a touch capture. |
OnManipulationBoundaryFeedback(ManipulationBoundaryFeedbackEventArgs) |
Called when the ManipulationBoundaryFeedback event occurs. |
OnManipulationCompleted(ManipulationCompletedEventArgs) |
Called when the ManipulationCompleted event occurs. |
OnManipulationDelta(ManipulationDeltaEventArgs) |
Called when the ManipulationDelta event occurs. |
OnManipulationInertiaStarting(ManipulationInertiaStartingEventArgs) |
Called when the ManipulationInertiaStarting event occurs. |
OnManipulationStarted(ManipulationStartedEventArgs) |
Called when the ManipulationStarted event occurs. |
OnManipulationStarting(ManipulationStartingEventArgs) |
Provides class handling for the ManipulationStarting routed event that occurs when the manipulation processor is first created. |
OnMouseDown(MouseButtonEventArgs) |
Invoked when an unhandled 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. |
OnMouseEnter(MouseEventArgs) |
Invoked when an unhandled MouseEnter attached event is raised on this element. Implement this method to add class handling for this event. |
OnMouseLeave(MouseEventArgs) |
Invoked when an unhandled MouseLeave attached event is raised on this element. Implement this method to add class handling for this event. |
OnMouseLeftButtonDown(MouseButtonEventArgs) |
Invoked when an unhandled MouseLeftButtonDown routed event is raised on this element. Implement this method to add class handling for this event. |
OnMouseLeftButtonUp(MouseButtonEventArgs) |
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. |
OnMouseMove(MouseEventArgs) |
Invoked when an unhandled 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. |
OnMouseRightButtonDown(MouseButtonEventArgs) |
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. |
OnMouseRightButtonUp(MouseButtonEventArgs) |
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. |
OnMouseUp(MouseButtonEventArgs) |
Invoked when an unhandled 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. |
OnMouseWheel(MouseWheelEventArgs) |
Invoked when an unhandled 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. |
OnPreviewDragEnter(DragEventArgs) |
Invoked when an unhandled 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. |
OnPreviewDragLeave(DragEventArgs) |
Invoked when an unhandled 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. |
OnPreviewDragOver(DragEventArgs) |
Invoked when an unhandled 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. |
OnPreviewDrop(DragEventArgs) |
Invoked when an unhandled 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. |
OnPreviewGiveFeedback(GiveFeedbackEventArgs) |
Invoked when an unhandled 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. |
OnPreviewGotKeyboardFocus(KeyboardFocusChangedEventArgs) |
Invoked when an unhandled 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. |
OnPreviewKeyDown(KeyEventArgs) |
Invoked when an unhandled 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. |
OnPreviewKeyUp(KeyEventArgs) |
Invoked when an unhandled 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. |
OnPreviewLostKeyboardFocus(KeyboardFocusChangedEventArgs) |
Invoked when an unhandled 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. |
OnPreviewMouseDown(MouseButtonEventArgs) |
Invoked when an unhandled 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. |
OnPreviewMouseLeftButtonDown(MouseButtonEventArgs) |
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. |
OnPreviewMouseLeftButtonUp(MouseButtonEventArgs) |
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. |
OnPreviewMouseMove(MouseEventArgs) |
Invoked when an unhandled 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. |
OnPreviewMouseRightButtonDown(MouseButtonEventArgs) |
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. |
OnPreviewMouseRightButtonUp(MouseButtonEventArgs) |
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. |
OnPreviewMouseUp(MouseButtonEventArgs) |
Invoked when an unhandled 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. |
OnPreviewMouseWheel(MouseWheelEventArgs) |
Invoked when an unhandled 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. |
OnPreviewQueryContinueDrag(QueryContinueDragEventArgs) |
Invoked when an unhandled 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. |
OnPreviewStylusButtonDown(StylusButtonEventArgs) |
Invoked when an unhandled 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. |
OnPreviewStylusButtonUp(StylusButtonEventArgs) |
Invoked when an unhandled 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. |
OnPreviewStylusDown(StylusDownEventArgs) |
Invoked when an unhandled 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. |
OnPreviewStylusInAirMove(StylusEventArgs) |
Invoked when an unhandled 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. |
OnPreviewStylusInRange(StylusEventArgs) |
Invoked when an unhandled 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. |
OnPreviewStylusMove(StylusEventArgs) |
Invoked when an unhandled 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. |
OnPreviewStylusOutOfRange(StylusEventArgs) |
Invoked when an unhandled 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. |
OnPreviewStylusSystemGesture(StylusSystemGestureEventArgs) |
Invoked when an unhandled 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. |
OnPreviewStylusUp(StylusEventArgs) |
Invoked when an unhandled 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. |
OnPreviewTextInput(TextCompositionEventArgs) |
Invoked when an unhandled 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. |
OnPreviewTouchDown(TouchEventArgs) |
Provides class handling for the PreviewTouchDown routed event that occurs when a touch presses this element. |
OnPreviewTouchMove(TouchEventArgs) |
Provides class handling for the PreviewTouchMove routed event that occurs when a touch moves while inside this element. |
OnPreviewTouchUp(TouchEventArgs) |
Provides class handling for the PreviewTouchUp routed event that occurs when a touch is released inside this element. |
OnPropertyChanged(DependencyPropertyChangedEventArgs) |
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) |
OnQueryContinueDrag(QueryContinueDragEventArgs) |
Invoked when an unhandled 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. |
OnQueryCursor(QueryCursorEventArgs) |
Invoked when an unhandled 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. |
OnRender(DrawingContext) |
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. |
OnRenderSizeChanged(SizeChangedInfo) |
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. |
OnStylusButtonDown(StylusButtonEventArgs) |
Invoked when an unhandled 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. |
OnStylusButtonUp(StylusButtonEventArgs) |
Invoked when an unhandled 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. |
OnStylusDown(StylusDownEventArgs) |
Invoked when an unhandled 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. |
OnStylusEnter(StylusEventArgs) |
Invoked when an unhandled StylusEnter attached event is raised by this element. Implement this method to add class handling for this event. |
OnStylusInAirMove(StylusEventArgs) |
Invoked when an unhandled 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. |
OnStylusInRange(StylusEventArgs) |
Invoked when an unhandled 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. |
OnStylusLeave(StylusEventArgs) |
Invoked when an unhandled StylusLeave attached event is raised by this element. Implement this method to add class handling for this event. |
OnStylusMove(StylusEventArgs) |
Invoked when an unhandled 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. |
OnStylusOutOfRange(StylusEventArgs) |
Invoked when an unhandled 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. |
OnStylusSystemGesture(StylusSystemGestureEventArgs) |
Invoked when an unhandled 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. |
OnStylusUp(StylusEventArgs) |
Invoked when an unhandled 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. |
OnTextInput(TextCompositionEventArgs) |
Invoked when an unhandled 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. |
OnTouchDown(TouchEventArgs) |
Provides class handling for the TouchDown routed event that occurs when a touch presses inside this element. |
OnTouchEnter(TouchEventArgs) |
Provides class handling for the TouchEnter routed event that occurs when a touch moves from outside to inside the bounds of this element. |
OnTouchLeave(TouchEventArgs) |
Provides class handling for the TouchLeave routed event that occurs when a touch moves from inside to outside the bounds of this UIElement. |
OnTouchMove(TouchEventArgs) |
Provides class handling for the TouchMove routed event that occurs when a touch moves while inside this element. |
OnTouchUp(TouchEventArgs) |
Provides class handling for the TouchUp routed event that occurs when a touch is released inside this element. |
OnVisualChildrenChanged(DependencyObject, DependencyObject) |
Called when the VisualCollection of the visual object is modified. (Inherited from Visual) |
OnVisualParentChanged(DependencyObject) |
Invoked when the parent element of this UIElement reports a change to its underlying visual parent. |
PointFromScreen(Point) |
Converts a Point in screen coordinates into a Point that represents the current coordinate system of the Visual. (Inherited from Visual) |
PointToScreen(Point) |
Converts a Point that represents the current coordinate system of the Visual into a Point in screen coordinates. (Inherited from Visual) |
PredictFocus(FocusNavigationDirection) |
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. |
RaiseEvent(RoutedEventArgs) |
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). |
ReadLocalValue(DependencyProperty) |
Returns the local value of a dependency property, if it exists. (Inherited from DependencyObject) |
ReleaseAllTouchCaptures() |
Releases all captured touch devices from this element. |
ReleaseMouseCapture() |
Releases the mouse capture, if this element held the capture. |
ReleaseStylusCapture() |
Releases the stylus device capture, if this element held the capture. |
ReleaseTouchCapture(TouchDevice) |
Attempts to release the specified touch device from this element. |
RemoveHandler(RoutedEvent, Delegate) |
Removes the specified routed event handler from this element. |
RemoveVisualChild(Visual) |
Removes the parent-child relationship between two visuals. (Inherited from Visual) |
SetCurrentValue(DependencyProperty, Object) |
Sets the value of a dependency property without changing its value source. (Inherited from DependencyObject) |
SetValue(DependencyProperty, Object) |
Sets the local value of a dependency property, specified by its dependency property identifier. (Inherited from DependencyObject) |
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) |
ShouldSerializeCommandBindings() |
Returns whether serialization processes should serialize the contents of the CommandBindings property on instances of this class. |
ShouldSerializeInputBindings() |
Returns whether serialization processes should serialize the contents of the InputBindings property on instances of this class. |
ShouldSerializeProperty(DependencyProperty) |
Returns a value that indicates whether serialization processes should serialize the value for the provided dependency property. (Inherited from DependencyObject) |
ToString() |
Returns a string that represents the current object. (Inherited from Object) |
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) |
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) |
TransformToDescendant(Visual) |
Returns a transform that can be used to transform coordinates from the Visual to the specified visual object descendant. (Inherited from Visual) |
TransformToVisual(Visual) |
Returns a transform that can be used to transform coordinates from the Visual to the specified visual object. (Inherited from Visual) |
TranslatePoint(Point, UIElement) |
Translates a point relative to this element to coordinates that are relative to the specified element. |
UpdateLayout() |
Ensures that all visual child elements of this element are properly updated for layout. |
VerifyAccess() |
Enforces that the calling thread has access to this DispatcherObject. (Inherited from DispatcherObject) |
Events
DragEnter |
Occurs when the input system reports an underlying drag event with this element as the drag target. |
DragLeave |
Occurs when the input system reports an underlying drag event with this element as the drag origin. |
DragOver |
Occurs when the input system reports an underlying drag event with this element as the potential drop target. |
Drop |
Occurs when the input system reports an underlying drop event with this element as the drop target. |
FocusableChanged |
Occurs when the value of the Focusable property changes. |
GiveFeedback |
Occurs when the input system reports an underlying drag-and-drop event that involves this element. |
GotFocus |
Occurs when this element gets logical focus. |
GotKeyboardFocus |
Occurs when the keyboard is focused on this element. |
GotMouseCapture |
Occurs when this element captures the mouse. |
GotStylusCapture |
Occurs when this element captures the stylus. |
GotTouchCapture |
Occurs when a touch is captured to this element. |
IsEnabledChanged |
Occurs when the value of the IsEnabled property on this element changes. |
IsHitTestVisibleChanged |
Occurs when the value of the IsHitTestVisible dependency property changes on this element. |
IsKeyboardFocusedChanged |
Occurs when the value of the IsKeyboardFocused property changes on this element. |
IsKeyboardFocusWithinChanged |
Occurs when the value of the IsKeyboardFocusWithin property changes on this element. |
IsMouseCapturedChanged |
Occurs when the value of the IsMouseCaptured property changes on this element. |
IsMouseCaptureWithinChanged |
Occurs when the value of the IsMouseCaptureWithinProperty changes on this element. |
IsMouseDirectlyOverChanged |
Occurs when the value of the IsMouseDirectlyOver property changes on this element. |
IsStylusCapturedChanged |
Occurs when the value of the IsStylusCaptured property changes on this element. |
IsStylusCaptureWithinChanged |
Occurs when the value of the IsStylusCaptureWithin property changes on this element. |
IsStylusDirectlyOverChanged |
Occurs when the value of the IsStylusDirectlyOver property changes on this element. |
IsVisibleChanged |
Occurs when the value of the IsVisible property changes on this element. |
KeyDown |
Occurs when a key is pressed while focus is on this element. |
KeyUp |
Occurs when a key is released while focus is on this element. |
LayoutUpdated |
Occurs when the layout of the various visual elements associated with the current Dispatcher changes. |
LostFocus |
Occurs when this element loses logical focus. |
LostKeyboardFocus |
Occurs when the keyboard is no longer focused on this element. |
LostMouseCapture |
Occurs when this element loses mouse capture. |
LostStylusCapture |
Occurs when this element loses stylus capture. |
LostTouchCapture |
Occurs when this element loses a touch capture. |
ManipulationBoundaryFeedback |
Occurs when the manipulation encounters a boundary. |
ManipulationCompleted |
Occurs when a manipulation and inertia on the UIElement object is complete. |
ManipulationDelta |
Occurs when the input device changes position during a manipulation. |
ManipulationInertiaStarting |
Occurs when the input device loses contact with the UIElement object during a manipulation and inertia begins. |
ManipulationStarted |
Occurs when an input device begins a manipulation on the UIElement object. |
ManipulationStarting |
Occurs when the manipulation processor is first created. |
MouseDown |
Occurs when any mouse button is pressed while the pointer is over this element. |
MouseEnter |
Occurs when the mouse pointer enters the bounds of this element. |
MouseLeave |
Occurs when the mouse pointer leaves the bounds of this element. |
MouseLeftButtonDown |
Occurs when the left mouse button is pressed while the mouse pointer is over this element. |
MouseLeftButtonUp |
Occurs when the left mouse button is released while the mouse pointer is over this element. |
MouseMove |
Occurs when the mouse pointer moves while over this element. |
MouseRightButtonDown |
Occurs when the right mouse button is pressed while the mouse pointer is over this element. |
MouseRightButtonUp |
Occurs when the right mouse button is released while the mouse pointer is over this element. |
MouseUp |
Occurs when any mouse button is released over this element. |
MouseWheel |
Occurs when the user rotates the mouse wheel while the mouse pointer is over this element. |
PreviewDragEnter |
Occurs when the input system reports an underlying drag event with this element as the drag target. |
PreviewDragLeave |
Occurs when the input system reports an underlying drag event with this element as the drag origin. |
PreviewDragOver |
Occurs when the input system reports an underlying drag event with this element as the potential drop target. |
PreviewDrop |
Occurs when the input system reports an underlying drop event with this element as the drop target. |
PreviewGiveFeedback |
Occurs when a drag-and-drop operation is started. |
PreviewGotKeyboardFocus |
Occurs when the keyboard is focused on this element. |
PreviewKeyDown |
Occurs when a key is pressed while focus is on this element. |
PreviewKeyUp |
Occurs when a key is released while focus is on this element. |
PreviewLostKeyboardFocus |
Occurs when the keyboard is no longer focused on this element. |
PreviewMouseDown |
Occurs when any mouse button is pressed while the pointer is over this element. |
PreviewMouseLeftButtonDown |
Occurs when the left mouse button is pressed while the mouse pointer is over this element. |
PreviewMouseLeftButtonUp |
Occurs when the left mouse button is released while the mouse pointer is over this element. |
PreviewMouseMove |
Occurs when the mouse pointer moves while the mouse pointer is over this element. |
PreviewMouseRightButtonDown |
Occurs when the right mouse button is pressed while the mouse pointer is over this element. |
PreviewMouseRightButtonUp |
Occurs when the right mouse button is released while the mouse pointer is over this element. |
PreviewMouseUp |
Occurs when any mouse button is released while the mouse pointer is over this element. |
PreviewMouseWheel |
Occurs when the user rotates the mouse wheel while the mouse pointer is over this element. |
PreviewQueryContinueDrag |
Occurs when there is a change in the keyboard or mouse button state during a drag-and-drop operation. |
PreviewStylusButtonDown |
Occurs when the stylus button is pressed while the pointer is over this element. |
PreviewStylusButtonUp |
Occurs when the stylus button is released while the pointer is over this element. |
PreviewStylusDown |
Occurs when the stylus touches the digitizer while it is over this element. |
PreviewStylusInAirMove |
Occurs when the stylus moves over an element without actually touching the digitizer. |
PreviewStylusInRange |
Occurs when the stylus is close enough to the digitizer to be detected, while over this element. |
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. |
PreviewStylusOutOfRange |
Occurs when the stylus is too far from the digitizer to be detected. |
PreviewStylusSystemGesture |
Occurs when a user performs one of several stylus gestures. |
PreviewStylusUp |
Occurs when the user raises the stylus off the digitizer while the stylus is over this element. |
PreviewTextInput |
Occurs when this element gets text in a device-independent manner. |
PreviewTouchDown |
Occurs when a finger touches the screen while the finger is over this element. |
PreviewTouchMove |
Occurs when a finger moves on the screen while the finger is over this element. |
PreviewTouchUp |
Occurs when a finger is raised off of the screen while the finger is over this element. |
QueryContinueDrag |
Occurs when there is a change in the keyboard or mouse button state during a drag-and-drop operation. |
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. |
StylusButtonDown |
Occurs when the stylus button is pressed while the pointer is over this element. |
StylusButtonUp |
Occurs when the stylus button is released while the pointer is over this element. |
StylusDown |
Occurs when the stylus touches the digitizer while the stylus is over this element. |
StylusEnter |
Occurs when the stylus enters the bounds of this element. |
StylusInAirMove |
Occurs when the stylus moves over an element without actually touching the digitizer. |
StylusInRange |
Occurs when the stylus is close enough to the digitizer to be detected, while over this element. |
StylusLeave |
Occurs when the stylus leaves the bounds of the element. |
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. |
StylusOutOfRange |
Occurs when the stylus is too far from the digitizer to be detected, while over this element. |
StylusSystemGesture |
Occurs when a user performs one of several stylus gestures. |
StylusUp |
Occurs when the user raises the stylus off the digitizer while it is over this element. |
TextInput |
Occurs when this element gets text in a device-independent manner. |
TouchDown |
Occurs when a finger touches the screen while the finger is over this element. |
TouchEnter |
Occurs when a touch moves from outside to inside the bounds of this element. |
TouchLeave |
Occurs when a touch moves from inside to outside the bounds of this element. |
TouchMove |
Occurs when a finger moves on the screen while the finger is over this element. |
TouchUp |
Occurs when a finger is raised off of the screen while the finger is over this element. |