Class DialogTrigger
DialogTrigger serves as a wrapper around a Dialog and its associated trigger, linking the Dialog's open state with the trigger's press state. Additionally, it allows you to customize the type and positioning of the Dialog.
Implements
Inherited Members
Namespace: Unity.AppUI.UI
Assembly: Unity.AppUI.dll
Syntax
public class DialogTrigger : BaseVisualElement, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IContextOverrideElement, IAdditionalDataHolder
Constructors
DialogTrigger()
Default constructor.
Declaration
public DialogTrigger()
Properties
anchor
The UI element used as an anchor.
Declaration
public VisualElement anchor { get; set; }
Property Value
Type | Description |
---|---|
VisualElement |
Remarks
This is only useful for presentations using popups of type AnchorPopup<T>.
containerPadding
The padding in pixels of the content inside the Popup.
Declaration
public int containerPadding { get; set; }
Property Value
Type | Description |
---|---|
int |
contentContainer
The content container of the DialogTrigger.
Declaration
public override VisualElement contentContainer { get; }
Property Value
Type | Description |
---|---|
VisualElement |
Overrides
crossOffset
The offset in pixels in the direction of the placement secondary vector.
Declaration
public int crossOffset { get; set; }
Property Value
Type | Description |
---|---|
int |
dialog
The dialog to display.
Declaration
public BaseDialog dialog { get; }
Property Value
Type | Description |
---|---|
BaseDialog |
hideArrow
Should the arrow be hidden.
Declaration
public bool hideArrow { get; set; }
Property Value
Type | Description |
---|---|
bool |
Remarks
This property is only useful with Popover presentation type.
isOpen
The open state of the dialog.
Declaration
public bool isOpen { get; }
Property Value
Type | Description |
---|---|
bool |
keyboardDismissEnabled
Disallow the use of Escape key or Return button to dismiss the dialog.
Declaration
public bool keyboardDismissEnabled { get; set; }
Property Value
Type | Description |
---|---|
bool |
mobileType
The type of presentation used for this dialog element on mobile platforms.
Declaration
public MobilePopupPresentationType mobileType { get; set; }
Property Value
Type | Description |
---|---|
MobilePopupPresentationType |
modalBackdrop
Enable or disable the blocking of the UI behind the dialog.
Declaration
public bool modalBackdrop { get; set; }
Property Value
Type | Description |
---|---|
bool |
Remarks
This property works only with Popover presentation type.
offset
The offset in pixels in the direction of the placement primary vector.
Declaration
public int offset { get; set; }
Property Value
Type | Description |
---|---|
int |
outsideClickDismissEnabled
Allow the use of clicking outside the dialog to dismiss it.
Declaration
public bool outsideClickDismissEnabled { get; set; }
Property Value
Type | Description |
---|---|
bool |
Remarks
This property works only with Popover presentation type.
placement
The placement of the Popover.
Declaration
public PopoverPlacement placement { get; set; }
Property Value
Type | Description |
---|---|
PopoverPlacement |
Remarks
This is only useful for presentations using popups of type AnchorPopup<T>.
resizable
Whether the dialog is resizable.
Declaration
public bool resizable { get; set; }
Property Value
Type | Description |
---|---|
bool |
Remarks
This is only useful for presentations using popups of type Popover.
resizeDirection
Which direction the dialog can be resized.
Declaration
public Draggable.DragDirection resizeDirection { get; set; }
Property Value
Type | Description |
---|---|
Draggable.DragDirection |
Remarks
This is only useful for presentations using popups of type Popover.
shouldFlip
Should the Popover placement be flipped if there's not enough space.
Declaration
public bool shouldFlip { get; set; }
Property Value
Type | Description |
---|---|
bool |
transitionDuration
The duration of the transition in milliseconds.
Declaration
public int transitionDuration { get; set; }
Property Value
Type | Description |
---|---|
int |
trayPosition
The position of the Tray element.
Declaration
public TrayPosition trayPosition { get; set; }
Property Value
Type | Description |
---|---|
TrayPosition |
Remarks
trigger
The trigger that will be used to start the display of the dialog element.
Declaration
public VisualElement trigger { get; }
Property Value
Type | Description |
---|---|
VisualElement |
type
The type of presentation used for this dialog element.
Declaration
public PopupPresentationType type { get; set; }
Property Value
Type | Description |
---|---|
PopupPresentationType |
Remarks
Some types are not available on mobile, to specify different presentation on mobile context use the mobileType property.