Share via


UIElement Class

Definition

UIElement is a base class for most of the Windows Runtime UI objects that have visual appearance and can process basic input as part of your app's user interface.

public ref class UIElement : DependencyObject
public ref class UIElement : DependencyObject, IAnimationObject
public ref class UIElement : DependencyObject, IAnimationObject, IVisualElement
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class UIElement : DependencyObject
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class UIElement : DependencyObject, IAnimationObject
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class UIElement : DependencyObject, IAnimationObject, IVisualElement
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public class UIElement : DependencyObject
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public class UIElement : DependencyObject, IAnimationObject
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public class UIElement : DependencyObject, IAnimationObject, IVisualElement
Public Class UIElement
Inherits DependencyObject
Public Class UIElement
Inherits DependencyObject
Implements IAnimationObject
Public Class UIElement
Inherits DependencyObject
Implements IAnimationObject, IVisualElement
Inheritance
Object Platform::Object IInspectable DependencyObject UIElement
Derived
Attributes
Implements

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

UIElement is a base element: it's a class that many other Windows Runtime classes inherit from in order to support the XAML UI element model. Properties, methods and events that UIElement defines are inherited by hundreds of other Windows Runtime classes.

Although UIElement defines the events for focus reporting (GotFocus, LostFocus), UIElement does not define an API for programmatically setting the focus. This capability is defined by the Control class.

UIElement does not expose a public constructor. Typically, you don't derive classes from either UIElement or FrameworkElement directly. More typically used base classes for derived custom classes are these classes:

The UIElement class is used as the type parameter of many properties and methods in the Windows Runtime API. For example, the Child property of Border takes a single UIElement, which represents the element that the Border is drawn around. You can provide any UIElement-derived element for such a property, including custom controls that you define.

The UIElementCollection class provides a strongly typed collection of UIElement items. UIElementCollection is used as a type for properties of objects that contain several child elements, for example for the Children property of any Panel class.

UIElement API and features

UIElement extends DependencyObject, which is another base element, and adds support for various Windows Runtime feature areas.

Input, and events for responding to user interaction

Much of the input behavior for visible elements in a UI is defined in the UIElement class. This includes the events for keyboard, mouse, touch, drag-drop, and focus interactions. For more info, see Handle pointer input, Keyboard interactions, and Custom user interactions.

Prominent API of UIElement that support input and user interaction:

Gestures and manipulations

Gestures and manipulations are also a way to handle input and user interaction. The API are listed out separately here because these events represent how the system interacts with device-level input actions and interprets them as a user interaction. Manipulations are a way to handle dynamic multi-touch interactions such as pinching and stretching. Together, the gestures and manipulations provide the touch patterns for touch interaction with UWP app. For more info, see Custom user interactions and Touch interaction design.

Prominent API of UIElement that support gestures and manipulations:

Basic appearance

The Visibility and Opacity properties are frequently used to adjust the appearance of an element in your UI, especially within styles, templates, and visual states. The Clip, RenderTransform, and Transitions properties are each useful for producing interactions and different looks for your UI elements.

Basic layout

The UIElement class provides a starting point for layout characteristics with properties such as DesiredSize and the Arrange and Measure methods. FrameworkElement adds more layout capabilities. For more info, see Define layouts with XAML and FrameworkElement.

Routed events

Most of the input events of UIElement are routed events. A routed event enables a built-in event handling notification system, so that a parent object can handle input events from child objects in the object tree if the event remains unhandled. This input event behavior is useful for input area grouping, and for control compositing. For more info, see Events and routed events overview.

Prominent API of UIElement that support routed events: AddHandler, RemoveHandler, *Event properties.

Other platform support

UIElement dependency properties

Many of the read-write properties of the UIElement base element class are dependency properties. Dependency properties support some of the basic programming model features for a UWP app using C++, C#, or Visual Basic, such as styles and templates, data binding, XAML resource references, and property-changed logic. For more info on dependency properties and the features they support, see Dependency properties overview.

UIElement derived classes

The only Windows Runtime class that derives directly from UIElement is FrameworkElement. For a list of the classes that derive from FrameworkElement, see the "FrameworkElement derived classes" section of the FrameworkElement reference topic.

Version history

Windows version SDK version Value added
1607 14393 AccessKey
1607 14393 AccessKeyDisplayDismissed
1607 14393 AccessKeyDisplayRequested
1607 14393 AccessKeyInvoked
1607 14393 AccessKeyScopeOwner
1607 14393 ContextCanceled
1607 14393 ContextFlyout
1607 14393 ContextRequested
1607 14393 ExitDisplayModeOnAccessKeyInvoked
1607 14393 IsAccessKeyScope
1703 15063 GettingFocus
1703 15063 GettingFocusEvent
1703 15063 HighContrastAdjustment
1703 15063 KeyTipHorizontalOffset
1703 15063 KeyTipPlacementMode
1703 15063 KeyTipVerticalOffset
1703 15063 Lights
1703 15063 LosingFocus
1703 15063 LosingFocusEvent
1703 15063 NoFocusCandidateFound
1703 15063 NoFocusCandidateFoundEvent
1703 15063 StartBringIntoView
1703 15063 StartBringIntoView(BringIntoViewOptions)
1703 15063 TabFocusNavigation
1703 15063 XYFocusDownNavigationStrategy
1703 15063 XYFocusKeyboardNavigation
1703 15063 XYFocusLeftNavigationStrategy
1703 15063 XYFocusRightNavigationStrategy
1703 15063 XYFocusUpNavigationStrategy
1709 16299 CharacterReceived
1709 16299 CharacterReceivedEvent
1709 16299 GetChildrenInTabFocusOrder
1709 16299 KeyboardAccelerators
1709 16299 OnProcessKeyboardAccelerators
1709 16299 PreviewKeyDown
1709 16299 PreviewKeyDownEvent
1709 16299 PreviewKeyUp
1709 16299 PreviewKeyUpEvent
1709 16299 ProcessKeyboardAccelerators
1709 16299 TryInvokeKeyboardAccelerator
1803 17134 BringIntoViewRequested
1803 17134 BringIntoViewRequestedEvent
1803 17134 ContextRequestedEvent
1803 17134 KeyboardAcceleratorPlacementMode
1803 17134 KeyboardAcceleratorPlacementTarget
1803 17134 KeyTipTarget
1803 17134 OnBringIntoViewRequested
1803 17134 OnKeyboardAcceleratorInvoked
1803 17134 RegisterAsScrollPort
1809 17763 CanBeScrollAnchor
1809 17763 CenterPoint
1809 17763 OpacityTransition
1809 17763 PopulatePropertyInfo
1809 17763 PopulatePropertyInfoOverride
1809 17763 Rotation
1809 17763 RotationAxis
1809 17763 RotationTransition
1809 17763 Scale
1809 17763 ScaleTransition
1809 17763 StartAnimation
1809 17763 StopAnimation
1809 17763 TransformMatrix
1809 17763 Translation
1809 17763 TranslationTransition
1903 18362 ActualOffset
1903 18362 ActualSize
1903 18362 Shadow
1903 18362 UIContext
1903 18362 XamlRoot

Properties

AccessKey

Gets or sets the access key (mnemonic) for this element.

AccessKeyProperty

Identifies for the AccessKey dependency property.

AccessKeyScopeOwner

Gets or sets a source element that provides the access key scope for this element, even if it's not in the visual tree of the source element.

AccessKeyScopeOwnerProperty

Identifies for the AccessKeyScopeOwner dependency property.

ActualOffset

Gets the position of this UIElement, relative to its parent, computed during the arrange pass of the layout process.

ActualSize

Gets the size that this UIElement computed during the arrange pass of the layout process.

AllowDrop

Gets or sets a value that determines whether this UIElement can be a drop target for purposes of drag-and-drop operations.

AllowDropProperty

Identifies the AllowDrop dependency property.

BringIntoViewRequestedEvent

Gets the identifier for the BringIntoViewRequested routed event.

CacheMode

Gets or sets a value that indicates that rendered content should be cached as a composited bitmap when possible.

CacheModeProperty

Identifies the CacheMode dependency property.

CanBeScrollAnchor

Gets or sets a value that indicates whether the UIElement can be a candidate for scroll anchoring.

CanBeScrollAnchorProperty

Identifies the CanBeScrollAnchor dependency property.

CanDrag

Gets or sets a value that indicates whether the element can be dragged as data in a drag-and-drop operation.

CanDragProperty

Identifies the CanDrag dependency property.

CenterPoint

Gets or sets the center point of the element, which is the point about which rotation or scaling occurs. Affects the rendering position of the element.

CharacterReceivedEvent

Gets the identifier for the CharacterReceived routed event.

Clip

Gets or sets the RectangleGeometry used to define the outline of the contents of a UIElement.

ClipProperty

Identifies the Clip dependency property.

CompositeMode

Gets or sets a property that declares alternate composition and blending modes for the element in its parent layout and window. This is relevant for elements that are involved in a mixed XAML / Microsoft DirectX UI.

CompositeModeProperty

Identifies the CompositeMode dependency property.

ContextFlyout

Gets or sets the flyout associated with this element.

ContextFlyoutProperty

Identifies for the ContextFlyout dependency property.

ContextRequestedEvent

Gets the identifier for the ContextRequested routed event.

DesiredSize

Gets the size that this UIElement computed during the measure pass of the layout process.

Dispatcher

Gets the CoreDispatcher that this object is associated with. The CoreDispatcher represents a facility that can access the DependencyObject on the UI thread even if the code is initiated by a non-UI thread.

(Inherited from DependencyObject)
DoubleTappedEvent

Gets the identifier for the DoubleTapped routed event.

DragEnterEvent

Gets the identifier for the DragEnter routed event.

DragLeaveEvent

Gets the identifier for the DragLeave routed event.

DragOverEvent

Gets the identifier for the DragOver routed event.

DropEvent

Gets the identifier for the Drop routed event.

ExitDisplayModeOnAccessKeyInvoked

Gets or sets a value that specifies whether the access key display is dismissed when an access key is invoked.

ExitDisplayModeOnAccessKeyInvokedProperty

Identifies the ExitDisplayModeOnAccessKeyInvoked  dependency property.

GettingFocusEvent

Gets the identifier for the GettingFocus routed event.

HighContrastAdjustment

Gets or sets a value that indicates whether the framework automatically adjusts the element's visual properties when high contrast themes are enabled.

HighContrastAdjustmentProperty

Identifies the HighContrastAdjustment dependency property.

HoldingEvent

Gets the identifier for the Holding routed event.

IsAccessKeyScope

Gets or sets a value that indicates whether an element defines its own access key scope.

IsAccessKeyScopeProperty

Identifies for the IsAccessKeyScope dependency property.

IsDoubleTapEnabled

Gets or sets a value that determines whether the DoubleTapped event can originate from that element.

IsDoubleTapEnabledProperty

Identifies the IsDoubleTapEnabled dependency property.

IsHitTestVisible

Gets or sets whether the contained area of this UIElement can return true values for hit testing.

IsHitTestVisibleProperty

Identifies the IsHitTestVisible dependency property.

IsHoldingEnabled

Gets or sets a value that determines whether the Holding event can originate from that element.

IsHoldingEnabledProperty

Identifies the IsHoldingEnabled dependency property.

IsRightTapEnabled

Gets or sets a value that determines whether the RightTapped event can originate from that element.

IsRightTapEnabledProperty

Identifies the IsRightTapEnabled dependency property.

IsTapEnabled

Gets or sets a value that determines whether the Tapped event can originate from that element.

IsTapEnabledProperty

Identifies the IsTapEnabled dependency property.

KeyboardAcceleratorPlacementMode

Gets or sets a value that indicates whether the control tooltip displays the key combination for its associated keyboard accelerator.

KeyboardAcceleratorPlacementModeProperty

Identifies the KeyboardAcceleratorPlacementMode dependency property.

KeyboardAcceleratorPlacementTarget

Gets or sets a value that indicates the control tooltip that displays the accelerator key combination.

KeyboardAcceleratorPlacementTargetProperty

Identifies the KeyboardAcceleratorPlacementTarget dependency property.

KeyboardAccelerators

Gets the collection of key combinations that invoke an action using the keyboard.

Accelerators are typically assigned to buttons or menu items.

Example of a menu showing keyboard accelerators for various menu items
Example of a menu showing keyboard accelerators for various menu items

KeyDownEvent

Gets the identifier for the KeyDown routed event.

KeyTipHorizontalOffset

Gets or sets a value that indicates how far left or right the Key Tip is placed in relation to the UIElement.

KeyTipHorizontalOffsetProperty

Identifies the KeyTipHorizontalOffset dependency property.

KeyTipPlacementMode

Gets or sets a value that indicates where the access key Key Tip is placed in relation to the boundary of the UIElement.

KeyTipPlacementModeProperty

Identifies the KeyTipPlacementMode dependency property.

KeyTipTarget

Gets or sets a value that indicates the element targeted by the access key Key Tip.

KeyTipTargetProperty

Identifies the KeyTipTarget dependency property.

KeyTipVerticalOffset

Gets or sets a value that indicates how far up or down the Key Tip is placed in relation to the UI element.

KeyTipVerticalOffsetProperty

Identifies the KeyTipVerticalOffset dependency property.

KeyUpEvent

Gets the identifier for the KeyUp routed event.

Lights

Gets the collection of XamlLight objects attached to this element.

LightsProperty

Identifies the Lights dependency property.

LosingFocusEvent

Gets the identifier for the LosingFocus routed event.

ManipulationCompletedEvent

Gets the identifier for the ManipulationCompleted routed event.

ManipulationDeltaEvent

Gets the identifier for the ManipulationDelta routed event.

ManipulationInertiaStartingEvent

Gets the identifier for the ManipulationInertiaStarting routed event.

ManipulationMode

Gets or sets the ManipulationModes value used for UIElement behavior and interaction with gestures. Setting this value enables handling the manipulation events from this element in app code.

ManipulationModeProperty

Identifies the ManipulationMode dependency property.

ManipulationStartedEvent

Gets the identifier for the ManipulationStarted routed event.

ManipulationStartingEvent

Gets the identifier for the ManipulationStarting routed event.

NoFocusCandidateFoundEvent

Gets the identifier for the NoFocusCandidateFound routed event.

Opacity

Gets or sets the degree of the object's opacity.

OpacityProperty

Identifies the IsHitTestVisible dependency property.

OpacityTransition

Gets or sets the ScalarTransition that animates changes to the Opacity property.

PointerCanceledEvent

Gets the identifier for the PointerCanceled routed event.

PointerCaptureLostEvent

Gets the identifier for the PointerCaptureLost routed event.

PointerCaptures

Gets the set of all captured pointers, represented as Pointer values.

PointerCapturesProperty

Identifies the PointerCaptures dependency property.

PointerEnteredEvent

Gets the identifier for the PointerEntered routed event.

PointerExitedEvent

Gets the identifier for the PointerExited routed event.

PointerMovedEvent

Gets the identifier for the PointerMoved routed event.

PointerPressedEvent

Gets the identifier for the PointerPressed routed event.

PointerReleasedEvent

Gets the identifier for the PointerReleased routed event.

PointerWheelChangedEvent

Gets the identifier for the PointerWheelChanged routed event.

PreviewKeyDownEvent

Gets the identifier for the PreviewKeyDown routed event.

PreviewKeyUpEvent

Gets the identifier for the PreviewKeyUp routed event.

Projection

Gets or sets the perspective projection (3-D effect) to apply when rendering this element.

ProjectionProperty

Identifies the Projection dependency property.

RenderSize

Gets the final render size of a UIElement. Use is not recommended, see Remarks.

RenderTransform

Gets or sets transform information that affects the rendering position of a UIElement.

RenderTransformOrigin

Gets or sets the origin point of any possible render transform declared by RenderTransform, relative to the bounds of the UIElement.

RenderTransformOriginProperty

Identifies the RenderTransformOrigin dependency property.

RenderTransformProperty

Identifies the RenderTransform dependency property.

RightTappedEvent

Gets the identifier for the RightTapped routed event.

Rotation

Gets or sets the angle of clockwise rotation, in degrees. Rotates relative to the RotationAxis and the CenterPoint. Affects the rendering position of the element.

RotationAxis

Gets or sets the axis to rotate the element around.

RotationTransition

Gets or sets the ScalarTransition that animates changes to the Rotation property.

Scale

Gets or sets the scale of the element. Scales relative to the element's CenterPoint. Affects the rendering position of the element.

ScaleTransition

Gets or sets the Vector3Transition that animates changes to the Scale property.

Shadow

Gets or sets the shadow effect cast by the element.

ShadowProperty

Identifies the Shadow dependency property.

TabFocusNavigation

Gets or sets a value that modifies how tabbing and TabIndex work for this control.

TabFocusNavigationProperty

Identifies the TabFocusNavigation dependency property.

TappedEvent

Gets the identifier for the Tapped routed event.

Transform3D

Gets or sets the 3-D transform effect to apply when rendering this element.

Transform3DProperty

Identifies the Transform3D dependency property.

TransformMatrix

Gets or sets the transformation matrix to apply to the element.

Transitions

Gets or sets the collection of Transition style elements that apply to a UIElement.

TransitionsProperty

Identifies the Transitions dependency property.

Translation

Gets or sets the x, y, and z rendering position of the element.

TranslationTransition

Gets or sets the Vector3Transition that animates changes to the Translation property.

UIContext

Gets the context identifier for the element.

UseLayoutRounding

Gets or sets a value that determines whether rendering for the object and its visual subtree should use rounding behavior that aligns rendering to whole pixels.

UseLayoutRoundingProperty

Identifies the UseLayoutRounding dependency property.

Visibility

Gets or sets the visibility of a UIElement. A UIElement that is not visible is not rendered and does not communicate its desired size to layout.

VisibilityProperty

Identifies the Visibility dependency property.

XamlRoot

Gets or sets the XamlRoot in which this element is being viewed.

XYFocusDownNavigationStrategy

Gets or sets a value that specifies the strategy used to determine the target element of a down navigation.

XYFocusDownNavigationStrategyProperty

Identifies the XYFocusDownNavigationStrategy dependency property.

XYFocusKeyboardNavigation

Gets or sets a value that enables or disables navigation using the keyboard directional arrows.

XYFocusKeyboardNavigationProperty

Identifies the XYFocusKeyboardNavigation dependency property.

XYFocusLeftNavigationStrategy

Gets or sets a value that specifies the strategy used to determine the target element of a left navigation.

XYFocusLeftNavigationStrategyProperty

Identifies the XYFocusLeftNavigationStrategy dependency property.

XYFocusRightNavigationStrategy

Gets or sets a value that specifies the strategy used to determine the target element of a right navigation.

XYFocusRightNavigationStrategyProperty

Identifies the XYFocusRightNavigationStrategy dependency property.

XYFocusUpNavigationStrategy

Gets or sets a value that specifies the strategy used to determine the target element of an up navigation.

XYFocusUpNavigationStrategyProperty

Identifies the XYFocusUpNavigationStrategy dependency property.

Methods

AddHandler(RoutedEvent, Object, 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 even if the event is handled elsewhere.

Arrange(Rect)

Positions child objects and determines a size for a UIElement. Parent objects that implement custom layout for their child elements should call this method from their layout override implementations to form a recursive layout update.

CancelDirectManipulations()

Cancels ongoing direct manipulation processing (system-defined panning/zooming) on any ScrollViewer parent that contains the current UIElement.

CapturePointer(Pointer)

Sets pointer capture to a UIElement. Once captured, only the element that has capture will fire pointer-related events.

ClearValue(DependencyProperty)

Clears the local value of a dependency property.

(Inherited from DependencyObject)
FindSubElementsForTouchTargeting(Point, Rect)

Enables a UIElement subclass to expose child elements that assist with resolving touch targeting.

GetAnimationBaseValue(DependencyProperty)

Returns any base value established for a dependency property, which would apply in cases where an animation is not active.

(Inherited from DependencyObject)
GetChildrenInTabFocusOrder()

Enables a UIElement subclass to expose child elements that take part in Tab focus.

GetValue(DependencyProperty)

Returns the current effective value of a dependency property from a DependencyObject.

(Inherited from DependencyObject)
InvalidateArrange()

Invalidates the arrange state (layout) for a UIElement. After the invalidation, the UIElement will have its layout updated, which will occur asynchronously.

InvalidateMeasure()

Invalidates the measurement state (layout) for a UIElement.

Measure(Size)

Updates the DesiredSize of a UIElement. Typically, objects that implement custom layout for their layout children call this method from their own MeasureOverride implementations to form a recursive layout update.

OnBringIntoViewRequested(BringIntoViewRequestedEventArgs)

Called before the BringIntoViewRequested event occurs.

OnCreateAutomationPeer()

When implemented in a derived class, returns class-specific AutomationPeer implementations for the Microsoft UI Automation infrastructure.

OnDisconnectVisualChildren()

Override this method to implement how layout and logic should behave when items are removed from a class-specific content or children property.

OnKeyboardAcceleratorInvoked(KeyboardAcceleratorInvokedEventArgs)

Called when a keyboard shortcut (or accelerator) is processed in your app. Override this method to handle how your app responds when a keyboard accelerator is invoked.

OnProcessKeyboardAccelerators(ProcessKeyboardAcceleratorEventArgs)

Called just before a keyboard shortcut (or accelerator) is processed in your app. Invoked whenever application code or internal processes call ProcessKeyboardAccelerators. Override this method to influence the default accelerator handling.

PopulatePropertyInfo(String, AnimationPropertyInfo)

Defines a property that can be animated.

PopulatePropertyInfoOverride(String, AnimationPropertyInfo)

When overridden in a derived class, defines a property that can be animated.

ReadLocalValue(DependencyProperty)

Returns the local value of a dependency property, if a local value is set.

(Inherited from DependencyObject)
RegisterAsScrollPort(UIElement)

Registers an element as representing a scrollable viewport.

RegisterPropertyChangedCallback(DependencyProperty, DependencyPropertyChangedCallback)

Registers a notification function for listening to changes to a specific DependencyProperty on this DependencyObject instance.

(Inherited from DependencyObject)
ReleasePointerCapture(Pointer)

Releases pointer captures for capture of one specific pointer by this UIElement.

ReleasePointerCaptures()

Releases all pointer captures held by this element.

RemoveHandler(RoutedEvent, Object)

Removes the specified routed event handler from this UIElement. Typically the handler in question was added by AddHandler.

SetValue(DependencyProperty, Object)

Sets the local value of a dependency property on a DependencyObject.

(Inherited from DependencyObject)
StartAnimation(ICompositionAnimationBase)

Begins the specified animation on the element.

StartBringIntoView()

Initiates a request to the XAML framework to bring the element into view within any scrollable regions it is contained within.

StartBringIntoView(BringIntoViewOptions)

Initiates a request to the XAML framework to bring the element into view using the specified options.

StartDragAsync(PointerPoint)

Initiates a drag-and-drop operation.

StopAnimation(ICompositionAnimationBase)

Stops the specified animation on the element.

TransformToVisual(UIElement)

Returns a transform object that can be used to transform coordinates from the UIElement to the specified object.

TryInvokeKeyboardAccelerator(ProcessKeyboardAcceleratorEventArgs)

Attempts to invoke a keyboard shortcut (or accelerator) by searching the entire visual tree of the UIElement for the shortcut.

TryStartDirectManipulation(Pointer)

Resumes direct manipulation processing (system-defined panning/zooming) on any ScrollViewer parent that contains the current UIElement.

UnregisterPropertyChangedCallback(DependencyProperty, Int64)

Cancels a change notification that was previously registered by calling RegisterPropertyChangedCallback.

(Inherited from DependencyObject)
UpdateLayout()

Ensures that all positions of child objects of a UIElement are properly updated for layout.

Events

AccessKeyDisplayDismissed

Occurs when access keys should no longer be displayed.

AccessKeyDisplayRequested

Occurs when the user requests that access keys be displayed.

AccessKeyInvoked

Occurs when a user completes an access key sequence.

BringIntoViewRequested

Occurs when StartBringIntoView is called on this element or one of its descendants.

CharacterReceived

Occurs when a single, composed character is received by the input queue.

ContextCanceled

Occurs when a context input gesture continues into a manipulation gesture, to notify the element that the context flyout should not be opened.

ContextRequested

Occurs when the user has completed a context input gesture, such as a right-click.

DoubleTapped

Occurs when an otherwise unhandled DoubleTap interaction occurs over the hit test area of this element.

DragEnter

Occurs when the input system reports an underlying drag event with this element as the target.

DragLeave

Occurs when the input system reports an underlying drag event with this element as the origin.

DragOver

Occurs when the input system reports an underlying drag event with this element as the potential drop target.

DragStarting

Occurs when a drag operation is initiated.

Drop

Occurs when the input system reports an underlying drop event with this element as the drop target.

DropCompleted

Occurs when a drag-and-drop operation with this element as the source is ended.

GettingFocus

Occurs before a UIElement receives focus. This event is raised synchronously to ensure focus isn't moved while the event is bubbling.

GotFocus

Occurs when a UIElement receives focus. This event is raised asynchronously, so focus can move again before bubbling is complete.

Holding

Occurs when an otherwise unhandled Hold interaction occurs over the hit test area of this element.

KeyDown

Occurs when a keyboard key is pressed while the UIElement has focus.

KeyUp

Occurs when a keyboard key is released while the UIElement has focus.

LosingFocus

Occurs before a UIElement loses focus. This event is raised synchronously to ensure focus isn't moved while the event is bubbling.

LostFocus

Occurs when a UIElement loses focus. This event is raised asynchronously, so focus can move again before bubbling is complete.

ManipulationCompleted

Occurs when a manipulation on the UIElement 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.

ManipulationStarting

Occurs when the manipulation processor is first created.

NoFocusCandidateFound

Occurs when a user attempts to move focus (via tab or directional arrows), but focus doesn't move because no focus candidate is found in the direction of movement.

PointerCanceled

Occurs when a pointer that made contact abnormally loses contact.

PointerCaptureLost

Occurs when pointer capture previously held by this element moves to another element or elsewhere.

PointerEntered

Occurs when a pointer enters the hit test area of this element.

PointerExited

Occurs when a pointer leaves the hit test area of this element.

PointerMoved

Occurs when a pointer moves while the pointer remains within the hit test area of this element.

PointerPressed

Occurs when the pointer device initiates a Press action within this element.

PointerReleased

Occurs when the pointer device that previously initiated a Press action is released, while within this element. Note that the end of a Press action is not guaranteed to fire a PointerReleased event; other events may fire instead. For more info, see Remarks.

PointerWheelChanged

Occurs when the delta value of a pointer wheel changes.

PreviewKeyDown

Occurs when a keyboard key is pressed while the UIElement has focus.

PreviewKeyUp

Occurs when a keyboard key is released while the UIElement has focus.

ProcessKeyboardAccelerators

Occurs when a keyboard shortcut (or accelerator) is pressed.

RightTapped

Occurs when a right-tap input stimulus happens while the pointer is over the element.

Tapped

Occurs when an otherwise unhandled Tap interaction occurs over the hit test area of this element.

Applies to

See also