Method SetAttributeForRole
SetAttributeForRole(VisualRole)
Selects the Attribute associated with the specified VisualRole as the Attribute to use for subsequent calls to AddRune(Rune) and AddStr(string).
Calls GetAttributeForRole(VisualRole) to get the Attribute associated with the specified role, which will raise OnGettingAttributeForRole(in VisualRole, ref Attribute)/GettingAttributeForRole.
public Attribute? SetAttributeForRole(VisualRole role)
Parameters
role
VisualRoleThe semantic VisualRole describing the element being rendered.
Returns
- Attribute?
The previously set Attribute.