4 using System.Diagnostics;
6 using SiliconStudio.Core;
7 using SiliconStudio.Core.Mathematics;
8 using SiliconStudio.Paradox.UI.Events;
10 namespace SiliconStudio.
Paradox.UI.Controls
15 [DebuggerDisplay(
"ModalElement - Name={Name}")]
18 internal Color OverlayColorInternal;
29 public event EventHandler<RoutedEventArgs> OutsideClick
31 add { AddHandler(OutsideClickEvent, value); }
32 remove { RemoveHandler(OutsideClickEvent, value); }
40 RoutingStrategy.Bubble,
45 OverlayColorInternal =
new Color(0, 0, 0, 0.4f);
54 public Color OverlayColor
56 get {
return OverlayColorInternal; }
57 set { OverlayColorInternal = value; }
65 get {
return DependencyProperties.Get(IsModalPropertyKey); }
66 set { DependencyProperties.Set(IsModalPropertyKey, value); }
73 if(!IsModal || args.
Source !=
this)
76 var position = args.WorldPosition -
new Vector3(WorldMatrixInternal.M41, WorldMatrixInternal.M42, WorldMatrixInternal.M43);
77 if (position.X < 0 || position.X > RenderSize.X
78 || position.Y < 0 || position.Y > RenderSize.Y)
81 RaiseEvent(eventArgs);
88 return base.Intersects(ref ray, out intersectionPoint);
90 var virtualResolution = UISystem.VirtualResolution;
91 var worldmatrix = Matrix.Identity;
93 return Collision.RayIntersectsRectangle(ref ray, ref worldmatrix, ref virtualResolution, 2, out intersectionPoint);
UIElement Source
Gets or sets a reference to the object that raised the event.
VerticalAlignment
Describes how a child element is vertically positioned or stretched within a parent's layout slot...
Contains state information and event data associated with a routed event.
Represents a three dimensional mathematical vector.
Represents a modal element that puts an overlay upon the underneath elements and freeze their input...
HorizontalAlignment
Indicates where an element should be displayed on the horizontal axis relative to the allocated layou...
override void OnTouchUp(TouchEventArgs args)
The class handler of the event TouchUp. This method can be overridden in inherited classes to perform...
The two bounding volumes overlap.
SiliconStudio.Core.Mathematics.Color Color
Represents a 32-bit color (4 bytes) in the form of RGBA (in byte order: R, G, B, A).
Represents a three dimensional line based on a point in space and a direction.
Provides data for touch input events.
Represents and identifies a routed event and declares its characteristics.
SiliconStudio.Core.Mathematics.Vector3 Vector3
A class that represents a tag propety.