Class BaseDialog
Base class for Dialogs (Dialog, AlertDialog, etc).
Implements
Inherited Members
Namespace: Unity.AppUI.UI
Assembly: Unity.AppUI.dll
Syntax
public abstract class BaseDialog : BaseVisualElement, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IContextOverrideElement, IAdditionalDataHolder, ISizeableElement
Constructors
BaseDialog()
Default constructor.
Declaration
protected BaseDialog()
Fields
buttonGroupUssClassName
The Dialog button group styling class.
Declaration
public const string buttonGroupUssClassName = "appui-dialog__buttongroup"
Field Value
Type | Description |
---|---|
string |
contentUssClassName
The Dialog content styling class.
Declaration
public const string contentUssClassName = "appui-dialog__content"
Field Value
Type | Description |
---|---|
string |
dividerUssClassName
The Dialog divider styling class.
Declaration
public const string dividerUssClassName = "appui-dialog__divider"
Field Value
Type | Description |
---|---|
string |
headerUssClassName
The Dialog header styling class.
Declaration
public const string headerUssClassName = "appui-dialog__header"
Field Value
Type | Description |
---|---|
string |
headingUssClassName
The Dialog heading styling class.
Declaration
public const string headingUssClassName = "appui-dialog__heading"
Field Value
Type | Description |
---|---|
string |
m_ActionContainer
The container for the Dialog actions (buttons).
Declaration
protected readonly VisualElement m_ActionContainer
Field Value
Type | Description |
---|---|
VisualElement |
m_Content
The Dialog content.
Declaration
protected readonly LocalizedTextElement m_Content
Field Value
Type | Description |
---|---|
LocalizedTextElement |
m_Divider
The Dialog header divider.
Declaration
protected readonly Divider m_Divider
Field Value
Type | Description |
---|---|
Divider |
m_Header
The Dialog header.
Declaration
protected readonly Heading m_Header
Field Value
Type | Description |
---|---|
Heading |
m_Heading
The Dialog heading.
Declaration
protected readonly VisualElement m_Heading
Field Value
Type | Description |
---|---|
VisualElement |
sizeUssClassName
The Dialog size styling class.
Declaration
public const string sizeUssClassName = "appui-dialog--size-"
Field Value
Type | Description |
---|---|
string |
ussClassName
The Dialog main styling class.
Declaration
public const string ussClassName = "appui-dialog"
Field Value
Type | Description |
---|---|
string |
variantUssClassName
The Dialog variant styling class.
Declaration
public const string variantUssClassName = "appui-dialog--"
Field Value
Type | Description |
---|---|
string |
Properties
actionContainer
The Dialog action container.
Declaration
public VisualElement actionContainer { get; }
Property Value
Type | Description |
---|---|
VisualElement |
contentContainer
The Dialog content container.
Declaration
public override VisualElement contentContainer { get; }
Property Value
Type | Description |
---|---|
VisualElement |
Overrides
description
The Dialog description. This is the text displayed in the content container.
Declaration
public string description { get; set; }
Property Value
Type | Description |
---|---|
string |
size
The Dialog size.
Declaration
public Size size { get; set; }
Property Value
Type | Description |
---|---|
Size |
title
The Dialog title.
Declaration
public string title { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
GetSizeUssClassName(Size)
Declaration
public static string GetSizeUssClassName(Size enumValue)
Parameters
Type | Name | Description |
---|---|---|
Size | enumValue |
Returns
Type | Description |
---|---|
string |
GetVariantUssClassName(AlertSemantic)
Declaration
public static string GetVariantUssClassName(AlertSemantic enumValue)
Parameters
Type | Name | Description |
---|---|---|
AlertSemantic | enumValue |
Returns
Type | Description |
---|---|
string |
RefreshHeading()
Refresh the heading visibility.
Declaration
protected void RefreshHeading()
ShouldHideHeading()
Check if the heading should be hidden. Override this method to change the default behavior. By default, the heading is hidden if the title is null or empty.
Declaration
protected virtual bool ShouldHideHeading()
Returns
Type | Description |
---|---|
bool | True if the heading should be hidden, false otherwise. |