diff --git a/schemas/pa-yaml/v3.0/pa.schema.yaml b/schemas/pa-yaml/v3.0/pa.schema.yaml index 903899f4..b356124c 100644 --- a/schemas/pa-yaml/v3.0/pa.schema.yaml +++ b/schemas/pa-yaml/v3.0/pa.schema.yaml @@ -209,6 +209,9 @@ definitions: Variant: type: string minLength: 1 + Layout: + type: string + minLength: 1 Group: true Properties: true Children: { $ref: "#/definitions/Children-Control-instance-sequence" } diff --git a/src/Persistence/PaYaml/Models/SchemaV3/ControlInstance.cs b/src/Persistence/PaYaml/Models/SchemaV3/ControlInstance.cs index f121c5dc..f08da803 100644 --- a/src/Persistence/PaYaml/Models/SchemaV3/ControlInstance.cs +++ b/src/Persistence/PaYaml/Models/SchemaV3/ControlInstance.cs @@ -26,6 +26,8 @@ public ControlInstance(string controlType) public string? ComponentLibraryUniqueName { get; init; } + public string? Layout { get; init; } + /// /// The name of the group of controls that this control should be grouped with. /// This does not impact the visual layout of the control or behavior, but is used to group controls together for organizational purposes from within the Studio. diff --git a/src/schemas-tests/pa-yaml/v3.0/Examples/Src/Screens/FormsScreen2.pa.yaml b/src/schemas-tests/pa-yaml/v3.0/Examples/Src/Screens/FormsScreen2.pa.yaml index 5313b8da..6bc881bb 100644 --- a/src/schemas-tests/pa-yaml/v3.0/Examples/Src/Screens/FormsScreen2.pa.yaml +++ b/src/schemas-tests/pa-yaml/v3.0/Examples/Src/Screens/FormsScreen2.pa.yaml @@ -36,6 +36,7 @@ Screens: Children: - Form1: Control: Form + Layout: vertical Properties: DataSource: =Contacts LayoutMinHeight: =250 diff --git a/src/schemas-tests/pa-yaml/v3.0/FullSchemaUses/Screens-general-controls.pa.yaml b/src/schemas-tests/pa-yaml/v3.0/FullSchemaUses/Screens-general-controls.pa.yaml index 707630e3..93c832a7 100644 --- a/src/schemas-tests/pa-yaml/v3.0/FullSchemaUses/Screens-general-controls.pa.yaml +++ b/src/schemas-tests/pa-yaml/v3.0/FullSchemaUses/Screens-general-controls.pa.yaml @@ -8,6 +8,7 @@ Screens: - ctrlB: Control: Label Variant: variantB + Layout: layoutB Group: Group1 Properties: Prop2: =ctrlBProp2 @@ -17,6 +18,7 @@ Screens: - ctrlA: Control: Label@1.2.3 Variant: variantA + Layout: layoutA Group: Group1 Properties: Prop2: =ctrlAProp2 @@ -27,6 +29,7 @@ Screens: - ctrlC: Control: FooWithChildren Variant: variant2 + Layout: layout2 Properties: Prop2: =ctrlAProp2 Prop1: =ctrlAProp1 @@ -34,6 +37,7 @@ Screens: - ctrlC0: Control: Bar Variant: variantC0 + Layout: layoutC0 Group: Group1 Properties: Prop2: =ctrlC0Prop2 @@ -42,9 +46,11 @@ Screens: - ctrlC00: Control: Car Variant: variantC00 + Layout: layoutC00 - ctrlC1: Control: Bar Variant: variantC1 + Layout: layoutC1 Group: Group1 Properties: Prop2: =ctrlC1Prop2 @@ -53,3 +59,4 @@ Screens: - ctrlC10: Control: Dog Variant: variantC10 + Layout: layoutC10 diff --git a/src/schemas/pa-yaml/v3.0/pa.schema.yaml b/src/schemas/pa-yaml/v3.0/pa.schema.yaml index dd368e85..63bff934 100644 --- a/src/schemas/pa-yaml/v3.0/pa.schema.yaml +++ b/src/schemas/pa-yaml/v3.0/pa.schema.yaml @@ -230,6 +230,9 @@ definitions: Variant: type: string minLength: 1 + Layout: + type: string + minLength: 1 Group: true Properties: true Children: { $ref: "#/definitions/Children-Control-instance-sequence" }