Class UIElement
Base class for all UI controls. Implements layout passes and basic functionality.
Inheritance
Inherited Members
Namespace: EmptyKeys.UserInterface
Assembly: EmptyKeys.UserInterface.dll
Syntax
public class UIElement : DependencyObject
Constructors
UIElement()
Initializes a new instance of the UIElement class.
Declaration
public UIElement()
Fields
CollapsedEvent
The collapsed event
Declaration
public static readonly RoutedEvent CollapsedEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
CursorTypeProperty
The cursor type property
Declaration
public static readonly DependencyProperty CursorTypeProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
DataContextProperty
The data context dependency property
Declaration
public static readonly DependencyProperty DataContextProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
desiredSize
The desired size
Declaration
protected Size desiredSize
Field Value
| Type | Description |
|---|---|
| EmptyKeys.UserInterface.Size |
EffectProperty
The effect property
Declaration
public static readonly DependencyProperty EffectProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
FocusableProperty
The focusable property
Declaration
public static readonly DependencyProperty FocusableProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
GamepadDownEvent
The game pad down event
Declaration
public static readonly RoutedEvent GamepadDownEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
GamepadMoveEvent
The game pad move event
Declaration
public static readonly RoutedEvent GamepadMoveEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
GamepadTriggerEvent
The game pad trigger event
Declaration
public static readonly RoutedEvent GamepadTriggerEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
GamepadUpEvent
The game pad up event
Declaration
public static readonly RoutedEvent GamepadUpEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
GotFocusEvent
The got focus event
Declaration
public static readonly RoutedEvent GotFocusEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
HeightProperty
The height dependency property
Declaration
public static readonly DependencyProperty HeightProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
HiddenEvent
The hidden event
Declaration
public static readonly RoutedEvent HiddenEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
HorizontalAlignmentProperty
The horizontal alignment dependency property
Declaration
public static readonly DependencyProperty HorizontalAlignmentProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
IsEnabledProperty
The is enabled property
Declaration
public static readonly DependencyProperty IsEnabledProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
IsFocusedProperty
The is focused property
Declaration
public static readonly DependencyProperty IsFocusedProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
IsHitTestVisibleProperty
The is hit test visible property
Declaration
public static readonly DependencyProperty IsHitTestVisibleProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
IsKeyboardFocusedProperty
The is keyboard focused property
Declaration
public static readonly DependencyProperty IsKeyboardFocusedProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
IsMouseCapturedProperty
The is mouse captured property
Declaration
public static readonly DependencyProperty IsMouseCapturedProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
IsMouseOverProperty
The is mouse over property
Declaration
public static readonly DependencyProperty IsMouseOverProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
IsTouchCapturedProperty
The is touch captured property
Declaration
public static readonly DependencyProperty IsTouchCapturedProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
KeyDownEvent
The key down event
Declaration
public static readonly RoutedEvent KeyDownEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
KeyUpEvent
The key up event
Declaration
public static readonly RoutedEvent KeyUpEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
LoadedEvent
The loaded event
Declaration
public static readonly RoutedEvent LoadedEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
LostFocusEvent
The lost focus event
Declaration
public static readonly RoutedEvent LostFocusEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
MarginProperty
The margin dependency property
Declaration
public static readonly DependencyProperty MarginProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
MaxHeightProperty
The maximum height property
Declaration
public static readonly DependencyProperty MaxHeightProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
MaxWidthProperty
The maximum width property
Declaration
public static readonly DependencyProperty MaxWidthProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
MinHeightProperty
The minimum height property
Declaration
public static readonly DependencyProperty MinHeightProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
MinWidthProperty
The minimum width property
Declaration
public static readonly DependencyProperty MinWidthProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
MouseDownEvent
The mouse down event
Declaration
public static readonly RoutedEvent MouseDownEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
MouseEnterEvent
The mouse enter event
Declaration
public static readonly RoutedEvent MouseEnterEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
MouseLeaveEvent
The mouse leave event
Declaration
public static readonly RoutedEvent MouseLeaveEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
MouseMoveEvent
The mouse move event
Declaration
public static readonly RoutedEvent MouseMoveEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
MouseUpEvent
The mouse up event
Declaration
public static readonly RoutedEvent MouseUpEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
MouseWheelEvent
The mouse wheel event
Declaration
public static readonly RoutedEvent MouseWheelEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
NameProperty
The name property
Declaration
public static readonly DependencyProperty NameProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
needsClipBounds
The needs clip bounds
Declaration
protected bool needsClipBounds
Field Value
| Type | Description |
|---|---|
| System.Boolean |
OpacityProperty
The opacity property
Declaration
public static readonly DependencyProperty OpacityProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
PreviewGamepadDownEvent
The preview game pad down event
Declaration
public static readonly RoutedEvent PreviewGamepadDownEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
PreviewGamepadMoveEvent
The preview game pad move event
Declaration
public static readonly RoutedEvent PreviewGamepadMoveEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
PreviewGamepadTriggerEvent
The preview game pad trigger event
Declaration
public static readonly RoutedEvent PreviewGamepadTriggerEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
PreviewGamepadUpEvent
The preview game pad up event
Declaration
public static readonly RoutedEvent PreviewGamepadUpEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
PreviewKeyDownEvent
The preview key down event
Declaration
public static readonly RoutedEvent PreviewKeyDownEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
PreviewKeyUpEvent
The preview key up event
Declaration
public static readonly RoutedEvent PreviewKeyUpEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
PreviewMouseDownEvent
The preview mouse down event
Declaration
public static readonly RoutedEvent PreviewMouseDownEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
PreviewMouseMoveEvent
The preview mouse move event
Declaration
public static readonly RoutedEvent PreviewMouseMoveEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
PreviewMouseUpEvent
The preview mouse up event
Declaration
public static readonly RoutedEvent PreviewMouseUpEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
PreviewMouseWheelEvent
The preview mouse wheel event
Declaration
public static readonly RoutedEvent PreviewMouseWheelEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
PreviewTouchDownEvent
The preview touch down event
Declaration
public static readonly RoutedEvent PreviewTouchDownEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
PreviewTouchGestureEvent
The preview touch gesture event
Declaration
public static readonly RoutedEvent PreviewTouchGestureEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
PreviewTouchMoveEvent
The preview touch move event
Declaration
public static readonly RoutedEvent PreviewTouchMoveEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
PreviewTouchUpEvent
The preview touch up event
Declaration
public static readonly RoutedEvent PreviewTouchUpEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
RequestBringIntoViewEvent
The request bring into view event
Declaration
public static readonly RoutedEvent RequestBringIntoViewEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
SizeChangedEvent
The size changed event
Declaration
public static readonly RoutedEvent SizeChangedEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
SnapsToDevicePixelsProperty
The snaps to device pixels property
Declaration
public static readonly DependencyProperty SnapsToDevicePixelsProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
StyleProperty
The style property
Declaration
public static readonly DependencyProperty StyleProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
TagProperty
The tag dependency property
Declaration
public static readonly DependencyProperty TagProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
ToolTipProperty
The tool tip property
Declaration
public static readonly DependencyProperty ToolTipProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
TouchDownEvent
The touch down event
Declaration
public static readonly RoutedEvent TouchDownEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
TouchGestureEvent
The touch gesture event
Declaration
public static readonly RoutedEvent TouchGestureEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
TouchMoveEvent
The touch move event
Declaration
public static readonly RoutedEvent TouchMoveEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
TouchUpEvent
The touch up event
Declaration
public static readonly RoutedEvent TouchUpEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
unclippedDesiredSize
The unclipped desired size
Declaration
protected Size unclippedDesiredSize
Field Value
| Type | Description |
|---|---|
| EmptyKeys.UserInterface.Size |
UnloadedEvent
The unloaded event
Declaration
public static readonly RoutedEvent UnloadedEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
UseLayoutRoundingProperty
The use layout rounding property
Declaration
public static readonly DependencyProperty UseLayoutRoundingProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
VerticalAlignmentProperty
The vertical alignment dependency property
Declaration
public static readonly DependencyProperty VerticalAlignmentProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
VisibilityProperty
The visibility dependency property
Declaration
public static readonly DependencyProperty VisibilityProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
VisibleEvent
The visible event
Declaration
public static readonly RoutedEvent VisibleEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
visualOffset
The visual offset rectangle
Declaration
protected Rect visualOffset
Field Value
| Type | Description |
|---|---|
| EmptyKeys.UserInterface.Rect |
WidthProperty
The width dependency property
Declaration
public static readonly DependencyProperty WidthProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
Properties
ActualHeight
Gets the actual height.
Declaration
public float ActualHeight { get; }
Property Value
| Type | Description |
|---|---|
| System.Single | The actual height. |
ActualWidth
Gets the actual width.
Declaration
public float ActualWidth { get; }
Property Value
| Type | Description |
|---|---|
| System.Single | The actual width. |
CursorType
Gets or sets the type of the cursor.
Declaration
public CursorType CursorType { get; set; }
Property Value
| Type | Description |
|---|---|
| CursorType | The type of the cursor. |
DataContext
Gets or sets the data context.
Declaration
public object DataContext { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Object | The data context. |
DesiredSize
Gets the size of the desired.
Declaration
public Size DesiredSize { get; }
Property Value
| Type | Description |
|---|---|
| EmptyKeys.UserInterface.Size | The size of the desired. |
DeviceRenderSize
Gets or sets the size of the device render.
Declaration
public Size DeviceRenderSize { get; set; }
Property Value
| Type | Description |
|---|---|
| EmptyKeys.UserInterface.Size | The size of the device render. |
DpiScaleX
Gets the dpi scale x.
Declaration
public static float DpiScaleX { get; }
Property Value
| Type | Description |
|---|---|
| System.Single | The dpi scale x. |
DpiScaleY
Gets the dpi scale y.
Declaration
public static float DpiScaleY { get; }
Property Value
| Type | Description |
|---|---|
| System.Single | The dpi scale y. |
Effect
Gets or sets the effect.
Declaration
public Effect Effect { get; set; }
Property Value
| Type | Description |
|---|---|
| Effect | The effect. |
Focusable
Gets or sets a value indicating whether this UIElement is focusable.
Declaration
public bool Focusable { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
Height
Gets or sets the height.
Declaration
public float Height { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Single | The height. |
HorizontalAlignment
Gets or sets the horizontal alignment.
Declaration
public HorizontalAlignment HorizontalAlignment { get; set; }
Property Value
| Type | Description |
|---|---|
| HorizontalAlignment | The horizontal alignment. |
InputBindings
Gets the input bindings.
Declaration
public List<InputBinding> InputBindings { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.List<InputBinding> | The input bindings. |
IsArrangeValid
Gets a value indicating whether [is arrange valid].
Declaration
public bool IsArrangeValid { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
IsEnabled
Gets or sets a value indicating whether this instance is enabled.
Declaration
public bool IsEnabled { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
IsEnabledCoerceValue
Gets a value indicating whether this instance is enabled coerce value.
Declaration
protected virtual bool IsEnabledCoerceValue { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
IsFocused
Gets or sets a value indicating whether this instance is focused.
Declaration
public bool IsFocused { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
IsHitTestVisible
Gets or sets a value indicating whether this instance is hit test visible.
Declaration
public bool IsHitTestVisible { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
IsKeyboardFocused
Gets a value indicating whether this instance is keyboard focused.
Declaration
public bool IsKeyboardFocused { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
IsLoaded
Gets a value indicating whether this instance is loaded.
Declaration
public bool IsLoaded { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
IsMeasureValid
Gets a value indicating whether [is measure valid].
Declaration
public bool IsMeasureValid { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
IsMouseCaptured
Gets a value indicating whether this instance is mouse captured.
Declaration
public bool IsMouseCaptured { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
IsMouseOver
Gets or sets a value indicating whether this instance is mouse over.
Declaration
public bool IsMouseOver { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
IsTouchCaptured
Gets a value indicating whether this instance is touch captured.
Declaration
public bool IsTouchCaptured { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
Margin
Gets or sets the margin.
Declaration
public Thickness Margin { get; set; }
Property Value
| Type | Description |
|---|---|
| EmptyKeys.UserInterface.Thickness | The margin. |
MaxHeight
Gets or sets the maximum height.
Declaration
public float MaxHeight { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Single | The maximum height. |
MaxWidth
Gets or sets the maximum width.
Declaration
public float MaxWidth { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Single | The maximum width. |
MinHeight
Gets or sets the minimum height.
Declaration
public float MinHeight { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Single | The minimum height. |
MinWidth
Gets or sets the minimum width.
Declaration
public float MinWidth { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Single | The minimum width. |
Name
Gets or sets the name.
Declaration
public string Name { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The name. |
Opacity
Gets or sets the opacity.
Declaration
public float Opacity { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Single | The opacity. |
Parent
Gets or sets the parent.
Declaration
public UIElement Parent { get; set; }
Property Value
| Type | Description |
|---|---|
| UIElement | The parent. |
RenderPosition
Gets or sets the render position.
Declaration
public PointF RenderPosition { get; }
Property Value
| Type | Description |
|---|---|
| EmptyKeys.UserInterface.PointF | The render position. |
RenderSize
Gets the size of the render.
Declaration
public Size RenderSize { get; }
Property Value
| Type | Description |
|---|---|
| EmptyKeys.UserInterface.Size | The size of the render. |
Resources
Gets or sets the resources.
Declaration
public ResourceDictionary Resources { get; }
Property Value
| Type | Description |
|---|---|
| ResourceDictionary | The resources. |
SnapsToDevicePixels
Gets or sets a value indicating whether [snaps to device pixels].
Declaration
public bool SnapsToDevicePixels { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
Style
Gets or sets the style.
Declaration
public Style Style { get; set; }
Property Value
| Type | Description |
|---|---|
| Style | The style. |
Tag
Gets or sets the tag.
Declaration
public object Tag { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Object | The tag. |
TemplatedParent
Gets the templated parent.
Declaration
public DependencyObject TemplatedParent { get; }
Property Value
| Type | Description |
|---|---|
| DependencyObject | The templated parent. |
ToolTip
Gets or sets the tool tip.
Declaration
public object ToolTip { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Object | The tool tip. |
Triggers
Gets the triggers - Trigger collection, only EventTriggers should be in this collection, others are ignored
Declaration
public List<TriggerBase> Triggers { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.List<TriggerBase> | The triggers. |
UseLayoutRounding
Gets or sets a value indicating whether [use layout rounding].
Declaration
public bool UseLayoutRounding { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
VerticalAlignment
Gets or sets the vertical alignment.
Declaration
public VerticalAlignment VerticalAlignment { get; set; }
Property Value
| Type | Description |
|---|---|
| VerticalAlignment | The vertical alignment. |
Visibility
Gets or sets the visibility.
Declaration
public Visibility Visibility { get; set; }
Property Value
| Type | Description |
|---|---|
| Visibility | The visibility. |
VisualOffset
Gets or sets the visual offset.
Declaration
public Rect VisualOffset { get; set; }
Property Value
| Type | Description |
|---|---|
| EmptyKeys.UserInterface.Rect | The visual offset. |
VisualPosition
Gets or sets the position.
Declaration
public PointF VisualPosition { get; set; }
Property Value
| Type | Description |
|---|---|
| EmptyKeys.UserInterface.PointF | The position. |
Width
Gets or sets the width.
Declaration
public float Width { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Single | The width. |
Methods
AddHandler(RoutedEvent, Delegate)
Adds the handler.
Declaration
public void AddHandler(RoutedEvent routedEvent, Delegate handler)
Parameters
| Type | Name | Description |
|---|---|---|
| RoutedEvent | routedEvent | The routed event. |
| System.Delegate | handler | The handler. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | routedEvent or handler |
AddToEventRoute(EventRoute, RoutedEventArgs)
Adds to event route.
Declaration
public void AddToEventRoute(EventRoute route, RoutedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| EventRoute | route | The route. |
| RoutedEventArgs | e | The RoutedEventArgs instance containing the event data. |
ApplyTemplate()
Applies the template.
Declaration
public bool ApplyTemplate()
Returns
| Type | Description |
|---|---|
| System.Boolean |
Arrange(Rect)
Arrange layout pass
Declaration
public void Arrange(Rect finalRect)
Parameters
| Type | Name | Description |
|---|---|---|
| EmptyKeys.UserInterface.Rect | finalRect | The final rectangle for element layout |
ArrangeOverride(Size)
Arrange layout pass - overrider method for children
Declaration
protected virtual Size ArrangeOverride(Size finalSize)
Parameters
| Type | Name | Description |
|---|---|---|
| EmptyKeys.UserInterface.Size | finalSize | The final size. |
Returns
| Type | Description |
|---|---|
| EmptyKeys.UserInterface.Size |
BringIntoView()
Brings element into view.
Declaration
public void BringIntoView()
CaptureMouse()
Captures the mouse.
Declaration
public void CaptureMouse()
CaptureTouch()
Captures the touch.
Declaration
public void CaptureTouch()
Contains(PointF, Size)
Determines whether [this element] contains [the specified point].
Declaration
public bool Contains(PointF point, Size size)
Parameters
| Type | Name | Description |
|---|---|---|
| EmptyKeys.UserInterface.PointF | point | The point. |
| EmptyKeys.UserInterface.Size | size | The size. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Draw(Renderer, Double, Single)
Draws UI Element.
Declaration
public void Draw(Renderer spriterenderer, double elapsedGameTime, float opacity)
Parameters
| Type | Name | Description |
|---|---|---|
| EmptyKeys.UserInterface.Renderers.Renderer | spriterenderer | The sprite renderer. |
| System.Double | elapsedGameTime | The elapsed game time. |
| System.Single | opacity | The opacity. |
FindResource(Object)
Finds the resource.
Declaration
public object FindResource(object key)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | key | The key. |
Returns
| Type | Description |
|---|---|
| System.Object |
Focus()
Focuses this instance.
Declaration
public void Focus()
InvalidateArrange()
Invalidates the arrange pass
Declaration
public void InvalidateArrange()
InvalidateIsEnabledOnChildren()
Invalidates the IsEnabled property value on children.
Declaration
protected virtual void InvalidateIsEnabledOnChildren()
InvalidateMeasure()
Invalidates the measure pass
Declaration
public void InvalidateMeasure()
Measure(Size)
Measures UI control
Declaration
public void Measure(Size availableSize)
Parameters
| Type | Name | Description |
|---|---|---|
| EmptyKeys.UserInterface.Size | availableSize | Size of the available. |
MeasureOverride(Size)
Measure layout pass
Declaration
protected virtual Size MeasureOverride(Size availableSize)
Parameters
| Type | Name | Description |
|---|---|---|
| EmptyKeys.UserInterface.Size | availableSize | available size for element |
Returns
| Type | Description |
|---|---|
| EmptyKeys.UserInterface.Size |
OnApplyTemplate()
Called when [apply template].
Declaration
public virtual void OnApplyTemplate()
OnDraw(Renderer, Double, Single)
Called when [draw].
Declaration
protected virtual void OnDraw(Renderer spriterenderer, double elapsedGameTime, float opacity)
Parameters
| Type | Name | Description |
|---|---|---|
| EmptyKeys.UserInterface.Renderers.Renderer | spriterenderer | The sprite renderer. |
| System.Double | elapsedGameTime | The elapsed game time. |
| System.Single | opacity | The opacity. |
OnGamepadDown(GamepadButtonEventArgs)
Raises the GamepadDown event.
Declaration
protected virtual void OnGamepadDown(GamepadButtonEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| GamepadButtonEventArgs | e | The GamepadButtonEventArgs instance containing the event data. |
OnGamepadMove(Object, GamepadMoveEventArgs)
Called when [game pad move].
Declaration
protected virtual void OnGamepadMove(object sender, GamepadMoveEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | The sender. |
| GamepadMoveEventArgs | e | The GamepadMoveEventArgs instance containing the event data. |
OnGamepadTrigger(Object, GamepadTriggerEventArgs)
Called when [game pad trigger].
Declaration
protected virtual void OnGamepadTrigger(object sender, GamepadTriggerEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | The sender. |
| GamepadTriggerEventArgs | e | The GamepadTriggerEventArgs instance containing the event data. |
OnGamepadUp(Object, GamepadButtonEventArgs)
Called when [game pad up].
Declaration
protected virtual void OnGamepadUp(object sender, GamepadButtonEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | The sender. |
| GamepadButtonEventArgs | e | The GamepadButtonEventArgs instance containing the event data. |
OnGotFocus(Object, RoutedEventArgs)
Called when [got focus].
Declaration
protected virtual void OnGotFocus(object sender, RoutedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | The sender. |
| RoutedEventArgs | e | The RoutedEventArgs instance containing the event data. |
OnIsEnabledChanged(DependencyPropertyChangedEventArgs)
Raises the IsEnabledChanged event.
Declaration
protected virtual void OnIsEnabledChanged(DependencyPropertyChangedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyPropertyChangedEventArgs | e | The DependencyPropertyChangedEventArgs instance containing the event data. |
OnIsMouseCapturedChanged(DependencyPropertyChangedEventArgs)
Raises the IsMouseCapturedChanged event.
Declaration
protected virtual void OnIsMouseCapturedChanged(DependencyPropertyChangedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyPropertyChangedEventArgs | e | The DependencyPropertyChangedEventArgs instance containing the event data. |
OnKeyDown(KeyEventArgs)
Raises the KeyDown event.
Declaration
protected virtual void OnKeyDown(KeyEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| KeyEventArgs | e | The KeyEventArgs instance containing the event data. |
OnKeyUp(Object, KeyEventArgs)
Called when [key up].
Declaration
protected virtual void OnKeyUp(object sender, KeyEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | The sender. |
| KeyEventArgs | e | The KeyEventArgs instance containing the event data. |
OnLostFocus(Object, RoutedEventArgs)
Called when [lost focus].
Declaration
protected virtual void OnLostFocus(object sender, RoutedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | The sender. |
| RoutedEventArgs | e | The RoutedEventArgs instance containing the event data. |
OnMouseDown(MouseButtonEventArgs)
Raises the MouseDown event.
Declaration
protected virtual void OnMouseDown(MouseButtonEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| MouseButtonEventArgs | e | The MouseButtonEventArgs instance containing the event data. |
OnMouseEnter(MouseEventArgs)
Raises the MouseEnter event.
Declaration
protected virtual void OnMouseEnter(MouseEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| MouseEventArgs | e | The MouseEventArgs instance containing the event data. |
OnMouseLeave(MouseEventArgs)
Raises the MouseLeave event.
Declaration
protected virtual void OnMouseLeave(MouseEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| MouseEventArgs | e | The MouseEventArgs instance containing the event data. |
OnMouseMove(Object, MouseEventArgs)
Called when [mouse move].
Declaration
protected virtual void OnMouseMove(object sender, MouseEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | The sender. |
| MouseEventArgs | e | The MouseEventArgs instance containing the event data. |
OnMouseUp(Object, MouseButtonEventArgs)
Called when [mouse up].
Declaration
protected virtual void OnMouseUp(object sender, MouseButtonEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | The sender. |
| MouseButtonEventArgs | e | The MouseButtonEventArgs instance containing the event data. |
OnMouseWheel(MouseWheelEventArgs)
Called when [mouse wheel].
Declaration
protected virtual void OnMouseWheel(MouseWheelEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| MouseWheelEventArgs | e | The MouseWheelEventArgs instance containing the event data. |
OnOpacityChanged(DependencyPropertyChangedEventArgs)
Raises the OpacityChanged event.
Declaration
protected virtual void OnOpacityChanged(DependencyPropertyChangedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyPropertyChangedEventArgs | e | The DependencyPropertyChangedEventArgs instance containing the event data. |
OnPreviewGamepadDown(Object, GamepadButtonEventArgs)
Called when [preview game pad down].
Declaration
protected virtual void OnPreviewGamepadDown(object sender, GamepadButtonEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | The sender. |
| GamepadButtonEventArgs | e | The GamepadButtonEventArgs instance containing the event data. |
OnPreviewGamepadMove(Object, GamepadMoveEventArgs)
Called when [preview game pad move].
Declaration
protected virtual void OnPreviewGamepadMove(object sender, GamepadMoveEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | The sender. |
| GamepadMoveEventArgs | e | The GamepadMoveEventArgs instance containing the event data. |
OnPreviewGamepadTrigger(Object, GamepadTriggerEventArgs)
Called when [preview game pad trigger].
Declaration
protected virtual void OnPreviewGamepadTrigger(object sender, GamepadTriggerEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | The sender. |
| GamepadTriggerEventArgs | e | The GamepadTriggerEventArgs instance containing the event data. |
OnPreviewGamepadUp(Object, GamepadButtonEventArgs)
Called when [preview game pad up].
Declaration
protected virtual void OnPreviewGamepadUp(object sender, GamepadButtonEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | The sender. |
| GamepadButtonEventArgs | e | The GamepadButtonEventArgs instance containing the event data. |
OnPreviewKeyDown(Object, KeyEventArgs)
Called when [preview key down].
Declaration
protected virtual void OnPreviewKeyDown(object sender, KeyEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | The sender. |
| KeyEventArgs | e | The KeyEventArgs instance containing the event data. |
OnPreviewKeyUp(Object, KeyEventArgs)
Called when [preview key up].
Declaration
protected virtual void OnPreviewKeyUp(object sender, KeyEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | The sender. |
| KeyEventArgs | e | The KeyEventArgs instance containing the event data. |
OnPreviewMouseDown(Object, MouseButtonEventArgs)
Called when [preview mouse down].
Declaration
protected virtual void OnPreviewMouseDown(object sender, MouseButtonEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | The sender. |
| MouseButtonEventArgs | e | The MouseButtonEventArgs instance containing the event data. |
OnPreviewMouseMove(Object, MouseEventArgs)
Called when [preview mouse move].
Declaration
protected virtual void OnPreviewMouseMove(object sender, MouseEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | The sender. |
| MouseEventArgs | e | The MouseEventArgs instance containing the event data. |
OnPreviewMouseUp(Object, MouseButtonEventArgs)
Called when [preview mouse up].
Declaration
protected virtual void OnPreviewMouseUp(object sender, MouseButtonEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | The sender. |
| MouseButtonEventArgs | e | The MouseButtonEventArgs instance containing the event data. |
OnPreviewMouseWheel(Object, MouseWheelEventArgs)
Called when [preview mouse wheel].
Declaration
protected virtual void OnPreviewMouseWheel(object sender, MouseWheelEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | The sender. |
| MouseWheelEventArgs | e | The MouseWheelEventArgs instance containing the event data. |
OnPreviewTouchDown(TouchEventArgs)
Raises the PreviewTouchDown event.
Declaration
protected virtual void OnPreviewTouchDown(TouchEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| TouchEventArgs | e | The TouchEventArgs instance containing the event data. |
OnPreviewTouchGesture(TouchGestureEventArgs)
Raises the PreviewTouchGesture event.
Declaration
protected virtual void OnPreviewTouchGesture(TouchGestureEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| TouchGestureEventArgs | e | The TouchGestureEventArgs instance containing the event data. |
OnPreviewTouchMove(TouchEventArgs)
Raises the PreviewTouchMove event.
Declaration
protected virtual void OnPreviewTouchMove(TouchEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| TouchEventArgs | e | The TouchEventArgs instance containing the event data. |
OnPreviewTouchUp(TouchEventArgs)
Raises the PreviewTouchUp event.
Declaration
protected virtual void OnPreviewTouchUp(TouchEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| TouchEventArgs | e | The TouchEventArgs instance containing the event data. |
OnPropertyChanged(DependencyProperty)
Called when [property changed].
Declaration
protected override void OnPropertyChanged(DependencyProperty property)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyProperty | property | The property. |
Overrides
OnTouchDown(TouchEventArgs)
Raises the TouchDown event.
Declaration
protected virtual void OnTouchDown(TouchEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| TouchEventArgs | e | The TouchEventArgs instance containing the event data. |
OnTouchGesture(TouchGestureEventArgs)
Raises the TouchGesture event.
Declaration
protected virtual void OnTouchGesture(TouchGestureEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| TouchGestureEventArgs | e | The TouchGestureEventArgs instance containing the event data. |
OnTouchMove(TouchEventArgs)
Raises the TouchMove event.
Declaration
protected virtual void OnTouchMove(TouchEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| TouchEventArgs | e | The TouchEventArgs instance containing the event data. |
OnTouchUp(TouchEventArgs)
Raises the TouchUp event.
Declaration
protected virtual void OnTouchUp(TouchEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| TouchEventArgs | e | The TouchEventArgs instance containing the event data. |
RaiseEvent(RoutedEventArgs)
Raises the event.
Declaration
public void RaiseEvent(RoutedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| RoutedEventArgs | e | The RoutedEventArgs instance containing the event data. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | e |
ReleaseMouseCapture()
Releases the mouse capture.
Declaration
public void ReleaseMouseCapture()
ReleaseTouchCapture()
Releases the touch capture.
Declaration
public void ReleaseTouchCapture()
RemoveHandler(RoutedEvent, Delegate)
Removes the handler.
Declaration
public void RemoveHandler(RoutedEvent routedEvent, Delegate handler)
Parameters
| Type | Name | Description |
|---|---|---|
| RoutedEvent | routedEvent | The routed event. |
| System.Delegate | handler | The handler. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | routedEvent or handler |
Events
Collapsed
Occurs when [collapsed].
Declaration
public event RoutedEventHandler Collapsed
Event Type
| Type | Description |
|---|---|
| RoutedEventHandler |
DataContextChanged
Occurs when [data context changed].
Declaration
public event DependencyPropertyChangedEventHandler DataContextChanged
Event Type
| Type | Description |
|---|---|
| DependencyPropertyChangedEventHandler |
GamepadDown
Occurs when [game pad down].
Declaration
public event GamepadButtonEventHandler GamepadDown
Event Type
| Type | Description |
|---|---|
| GamepadButtonEventHandler |
GamepadMove
Occurs when [game pad move].
Declaration
public event GamepadMoveEventHandler GamepadMove
Event Type
| Type | Description |
|---|---|
| GamepadMoveEventHandler |
GamepadTrigger
Occurs when [game pad trigger].
Declaration
public event GamepadTriggerEventHandler GamepadTrigger
Event Type
| Type | Description |
|---|---|
| GamepadTriggerEventHandler |
GamepadUp
Occurs when [game pad up].
Declaration
public event GamepadButtonEventHandler GamepadUp
Event Type
| Type | Description |
|---|---|
| GamepadButtonEventHandler |
GotFocus
Occurs when [got focus].
Declaration
public event RoutedEventHandler GotFocus
Event Type
| Type | Description |
|---|---|
| RoutedEventHandler |
Hidden
Occurs when [hidden].
Declaration
public event RoutedEventHandler Hidden
Event Type
| Type | Description |
|---|---|
| RoutedEventHandler |
IsEnabledChanged
Occurs when [is enabled changed].
Declaration
public event DependencyPropertyChangedEventHandler IsEnabledChanged
Event Type
| Type | Description |
|---|---|
| DependencyPropertyChangedEventHandler |
IsMouseCapturedChanged
Occurs when [is mouse captured changed].
Declaration
public event DependencyPropertyChangedEventHandler IsMouseCapturedChanged
Event Type
| Type | Description |
|---|---|
| DependencyPropertyChangedEventHandler |
KeyDown
Occurs when [key down].
Declaration
public event KeyEventHandler KeyDown
Event Type
| Type | Description |
|---|---|
| KeyEventHandler |
KeyUp
Occurs when [key up].
Declaration
public event KeyEventHandler KeyUp
Event Type
| Type | Description |
|---|---|
| KeyEventHandler |
LayoutUpdated
Occurs when [layout updated].
Declaration
public event EventHandler LayoutUpdated
Event Type
| Type | Description |
|---|---|
| System.EventHandler |
Loaded
Occurs when [loaded].
Declaration
public event RoutedEventHandler Loaded
Event Type
| Type | Description |
|---|---|
| RoutedEventHandler |
LostFocus
Occurs when [lost focus].
Declaration
public event RoutedEventHandler LostFocus
Event Type
| Type | Description |
|---|---|
| RoutedEventHandler |
MouseDown
Occurs when [mouse down].
Declaration
public event MouseButtonEventHandler MouseDown
Event Type
| Type | Description |
|---|---|
| MouseButtonEventHandler |
MouseEnter
Occurs when [mouse enter].
Declaration
public event MouseEventHandler MouseEnter
Event Type
| Type | Description |
|---|---|
| MouseEventHandler |
MouseLeave
Occurs when [mouse leave].
Declaration
public event MouseEventHandler MouseLeave
Event Type
| Type | Description |
|---|---|
| MouseEventHandler |
MouseMove
Occurs when [mouse move].
Declaration
public event MouseEventHandler MouseMove
Event Type
| Type | Description |
|---|---|
| MouseEventHandler |
MouseUp
Occurs when [mouse up].
Declaration
public event MouseButtonEventHandler MouseUp
Event Type
| Type | Description |
|---|---|
| MouseButtonEventHandler |
MouseWheel
Occurs when [mouse wheel].
Declaration
public event MouseWheelEventHandler MouseWheel
Event Type
| Type | Description |
|---|---|
| MouseWheelEventHandler |
PreviewGamepadDown
Occurs when [preview game pad down].
Declaration
public event GamepadButtonEventHandler PreviewGamepadDown
Event Type
| Type | Description |
|---|---|
| GamepadButtonEventHandler |
PreviewGamepadMove
Occurs when [preview game pad move].
Declaration
public event GamepadMoveEventHandler PreviewGamepadMove
Event Type
| Type | Description |
|---|---|
| GamepadMoveEventHandler |
PreviewGamepadTrigger
Occurs when [preview game pad trigger].
Declaration
public event GamepadTriggerEventHandler PreviewGamepadTrigger
Event Type
| Type | Description |
|---|---|
| GamepadTriggerEventHandler |
PreviewGamepadUp
Occurs when [preview game pad up].
Declaration
public event GamepadButtonEventHandler PreviewGamepadUp
Event Type
| Type | Description |
|---|---|
| GamepadButtonEventHandler |
PreviewKeyDown
Occurs when [preview key down].
Declaration
public event KeyEventHandler PreviewKeyDown
Event Type
| Type | Description |
|---|---|
| KeyEventHandler |
PreviewKeyUp
Occurs when [preview key up].
Declaration
public event KeyEventHandler PreviewKeyUp
Event Type
| Type | Description |
|---|---|
| KeyEventHandler |
PreviewMouseDown
Occurs when [preview mouse down].
Declaration
public event MouseButtonEventHandler PreviewMouseDown
Event Type
| Type | Description |
|---|---|
| MouseButtonEventHandler |
PreviewMouseMove
Occurs when [preview mouse move].
Declaration
public event MouseEventHandler PreviewMouseMove
Event Type
| Type | Description |
|---|---|
| MouseEventHandler |
PreviewMouseUp
Occurs when [preview mouse up].
Declaration
public event MouseButtonEventHandler PreviewMouseUp
Event Type
| Type | Description |
|---|---|
| MouseButtonEventHandler |
PreviewMouseWheel
Occurs when [preview mouse wheel].
Declaration
public event MouseWheelEventHandler PreviewMouseWheel
Event Type
| Type | Description |
|---|---|
| MouseWheelEventHandler |
PreviewTouchDown
Occurs when [preview touch down].
Declaration
public event RoutedEventHandler PreviewTouchDown
Event Type
| Type | Description |
|---|---|
| RoutedEventHandler |
PreviewTouchGesture
Occurs when [preview touch gesture].
Declaration
public event RoutedEventHandler PreviewTouchGesture
Event Type
| Type | Description |
|---|---|
| RoutedEventHandler |
PreviewTouchMove
Occurs when [preview touch move].
Declaration
public event RoutedEventHandler PreviewTouchMove
Event Type
| Type | Description |
|---|---|
| RoutedEventHandler |
PreviewTouchUp
Occurs when [preview touch up].
Declaration
public event RoutedEventHandler PreviewTouchUp
Event Type
| Type | Description |
|---|---|
| RoutedEventHandler |
RequestBringIntoView
Occurs when [request bring into view].
Declaration
public event RequestBringIntoViewEventHandler RequestBringIntoView
Event Type
| Type | Description |
|---|---|
| RequestBringIntoViewEventHandler |
SizeChanged
Occurs when [size changed].
Declaration
public event RoutedEventHandler SizeChanged
Event Type
| Type | Description |
|---|---|
| RoutedEventHandler |
TouchDown
Occurs when [touch down].
Declaration
public event RoutedEventHandler TouchDown
Event Type
| Type | Description |
|---|---|
| RoutedEventHandler |
TouchGesture
Occurs when [touch gesture].
Declaration
public event RoutedEventHandler TouchGesture
Event Type
| Type | Description |
|---|---|
| RoutedEventHandler |
TouchMove
Occurs when [touch move].
Declaration
public event RoutedEventHandler TouchMove
Event Type
| Type | Description |
|---|---|
| RoutedEventHandler |
TouchUp
Occurs when [touch up].
Declaration
public event RoutedEventHandler TouchUp
Event Type
| Type | Description |
|---|---|
| RoutedEventHandler |
Unloaded
Occurs when [unloaded].
Declaration
public event RoutedEventHandler Unloaded
Event Type
| Type | Description |
|---|---|
| RoutedEventHandler |
Visible
Occurs when [visible].
Declaration
public event RoutedEventHandler Visible
Event Type
| Type | Description |
|---|---|
| RoutedEventHandler |