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: solution.dll
Syntax
public class DialogTrigger : BaseVisualElement, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IContextOverrideElement
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 |
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 Dialog dialog { get; }
Property Value
Type | Description |
---|---|
Dialog |
hideArrow
Should the arrow be hidden.
Declaration
public bool hideArrow { get; set; }
Property Value
Type | Description |
---|---|
bool |
isOpen
The open state of the dialog.
Declaration
public bool isOpen { get; }
Property Value
Type | Description |
---|---|
bool |
keyboardDismissDisabled
Disallow the use of Escape key or Return button to dismiss the dialog.
Declaration
public bool keyboardDismissDisabled { 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 |
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 |
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 |