Class DensityContext
The Density context of the application.
Inherited Members
Namespace: Unity.AppUI.Core
Assembly: Unity.AppUI.dll
Syntax
public record DensityContext : IContext, IEquatable<DensityContext>
Remarks
Density is the design-system sizing axis. Valid values are normal, compact
and comfort, matching the density token sets shipped by @unity/app-ui-tokens.
It is unrelated to scaleFactor, which is the native display DPI.
Constructors
DensityContext(string)
The Density context of the application.
Declaration
public DensityContext(string density)
Parameters
| Type | Name | Description |
|---|---|---|
| string | density | The density. |
Remarks
Density is the design-system sizing axis. Valid values are normal, compact
and comfort, matching the density token sets shipped by @unity/app-ui-tokens.
It is unrelated to scaleFactor, which is the native display DPI.
Properties
density
The current density.
Declaration
public string density { get; }
Property Value
| Type | Description |
|---|---|
| string |