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, ISizeableElement
Constructors
BaseDialog()
Default constructor.
Declaration
protected BaseDialog()
Fields
buttonGroupUssClassName
The Dialog button group styling class.
Declaration
public static readonly string buttonGroupUssClassName
Field Value
| Type | Description |
|---|---|
| string |
contentUssClassName
The Dialog content styling class.
Declaration
public static readonly string contentUssClassName
Field Value
| Type | Description |
|---|---|
| string |
dividerUssClassName
The Dialog divider styling class.
Declaration
public static readonly string dividerUssClassName
Field Value
| Type | Description |
|---|---|
| string |
headerUssClassName
The Dialog header styling class.
Declaration
public static readonly string headerUssClassName
Field Value
| Type | Description |
|---|---|
| string |
headingUssClassName
The Dialog heading styling class.
Declaration
public static readonly string headingUssClassName
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 static readonly string sizeUssClassName
Field Value
| Type | Description |
|---|---|
| string |
ussClassName
The Dialog main styling class.
Declaration
public static readonly string ussClassName
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
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. |