Class UxmlElementNameAttribute
Attribute to bind a property or field to a UXML element by its name. When used in conjunction with UxmlFilePathAttribute, the source generator will automatically query the element from the visual tree and assign it to the decorated member.
Inherited Members
Namespace: Unity.AppUI.UI
Assembly: Unity.AppUI.dll
Syntax
[AttributeUsage(AttributeTargets.Property|AttributeTargets.Field)]
public class UxmlElementNameAttribute : Attribute
Constructors
UxmlElementNameAttribute(string)
Constructor
Declaration
public UxmlElementNameAttribute(string elementName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | elementName | The name of the element in the UXML file |
Properties
elementName
The name of the element in the UXML file to bind to.
Declaration
public string elementName { get; }
Property Value
| Type | Description |
|---|---|
| string |