Table of Contents

Class ModalElement

Namespace
Stride.UI.Controls
Assembly
Stride.UI.dll

Represents a modal element that puts an overlay upon the underneath elements and freeze their input.

[DataContract("ModalElement")]
[DataContractMetadataType(typeof(ModalElement.ModalElementMetadata))]
[Display(null, null)]
public class ModalElement : ButtonBase, IUIElementUpdate, IUIElementChildren, IIdentifiable
Inheritance
ModalElement
Implements
Inherited Members
Extension Methods

Constructors

ModalElement()

public ModalElement()

Fields

OutsideClickEvent

Identifies the OutsideClick routed event.

public static readonly RoutedEvent<RoutedEventArgs> OutsideClickEvent

Field Value

RoutedEvent<RoutedEventArgs>

Properties

IsModal

Determine if the control should block the input of underneath elements or not.

[DataMember]
[Display(null, "Behavior")]
public bool IsModal { get; set; }

Property Value

bool

OverlayColor

The color of the overlay drawn upon underneath elements.

[DataMember]
[Display(null, "Appearance")]
public Color OverlayColor { get; set; }

Property Value

Color

Methods

Intersects(ref Ray, out Vector3)

Calculate the intersection of the UI element and the ray.

protected override bool Intersects(ref Ray ray, out Vector3 intersectionPoint)

Parameters

ray Ray

The ray in world space coordinate

intersectionPoint Vector3

The intersection point in world space coordinate

Returns

bool

true if the two elements intersects, false otherwise

OnTouchUp(TouchEventArgs)

The class handler of the event TouchUp. This method can be overridden in inherited classes to perform actions common to all instances of a class.

protected override void OnTouchUp(TouchEventArgs args)

Parameters

args TouchEventArgs

The arguments of the event

Events

OutsideClick

Occurs when the element is modal and the user click outside of the modal element.

public event EventHandler<RoutedEventArgs> OutsideClick

Event Type

EventHandler<RoutedEventArgs>

Remarks

A click event is bubbling