StretchToParentWidth(VisualElement)
Aligns a VisualElement's left and right edges with the corresponding edges of its parent.
読み終わるまでの所要時間 1 分最終更新 20日前
Definition
- Type: Method
- Namespace: UnityEngine.UIElements
- Assembly: UnityEngine.UIElementsModule
public static void StretchToParentWidth(this VisualElement elem)
Parameters
The element to be aligned with its parent
Remarks
This method provides a way to set the following styles in one operation:
-
IStyle.position is set to Position.Absolute
-
IStyle.left is set to 0
-
IStyle.right is set to 0