Skip to content

UIElementMarkupExtensions class

Generated fluent setters and event subscriptions for UIElement.

Guide: C# Markup guide

public static class UIElementMarkupExtensions
name description
static AllowDrop<T>(…) Sets whether the element accepts drops, taking part in drop-target hit testing and receiving DragEnter, DragOver, DragLeave and Drop.
static BackdropFallbackBrush<T>(…) Sets the brush drawn in place of the backdrop where what is behind the element cannot be read; null draws nothing there.
static BackdropFilter<T>(…) Sets the filter applied to what is drawn behind the element, such as a blur for frosted glass. The element’s own background and content are drawn over the result.
static CacheMode<T>(…) Sets how this element’s rendering is cached, or null for no cache.
static CanDrag<T>(…) Sets whether the element initiates drag sessions via a mouse gesture.
static Cursor<T>(…) Sets the cursor shown while the mouse is over this element; null inherits from the parent or the platform default, and None hides the cursor.
static Focusable<T>(…) Sets whether this element can receive keyboard focus.
static IsEnabled<T>(…) Sets whether the element is enabled for input.
static IsHitTestVisible<T>(…) Sets whether the element participates in hit testing.
static IsTabStop<T>(…) Sets whether the element participates in Tab traversal.
static IsVisible<T>(…) Sets whether the element is visible.
static OnDragCompleted<T>(…) Subscribes handler to DragCompleted. Occurs once a drag session originating from this element has ended (drop, reject, or cancel).
static OnDragEnter<T>(…) Subscribes handler to DragEnter. Occurs when a drag enters the element’s hit-test bounds.
static OnDragLeave<T>(…) Subscribes handler to DragLeave. Occurs when a drag leaves the element’s hit-test bounds.
static OnDragOver<T>(…) Subscribes handler to DragOver. Occurs while a drag is over the element.
static OnDragStarting<T>(…) Subscribes handler to DragStarting. Occurs after a drag gesture is detected on this element; handlers populate Data and AllowedEffects to start the session, or set Cancel.
static OnDrop<T>(…) Subscribes handler to Drop. Occurs when data is dropped onto the element.
static OnGotFocus<T>(…) Subscribes handler to GotFocus. Occurs when the element receives keyboard focus.
static OnKeyDown<T>(…) Subscribes handler to KeyDown. Occurs when a key is pressed while the element has focus; marking it handled also drops the text input the keystroke would produce.
static OnKeyUp<T>(…) Subscribes handler to KeyUp. Occurs when a key is released while the element has focus.
static OnLostFocus<T>(…) Subscribes handler to LostFocus. Occurs when the element loses keyboard focus.
static OnMouseDoubleClick<T>(…) Subscribes handler to MouseDoubleClick. Occurs when the user double-clicks a mouse button over the element.
static OnMouseDown<T>(…) Subscribes handler to MouseDown. Occurs when a mouse button is pressed over the element.
static OnMouseEnter<T>(…) Subscribes handler to MouseEnter. Occurs when the mouse enters the element.
static OnMouseLeave<T>(…) Subscribes handler to MouseLeave. Occurs when the mouse leaves the element.
static OnMouseMove<T>(…) Subscribes handler to MouseMove. Occurs when the mouse moves over the element.
static OnMouseUp<T>(…) Subscribes handler to MouseUp. Occurs when a mouse button is released over the element.
static OnMouseWheel<T>(…) Subscribes handler to MouseWheel. Occurs when the mouse wheel is scrolled over the element.
static Opacity<T>(…) Sets the opacity of the element and its subtree, from 0 to 1.
static SkipViewportCull<T>(…) Sets whether the element is drawn even when it lies outside the viewport; inherited by descendants.
static TabIndex<T>(…) Sets the position in the Tab order.