How to apply a Layout to a Panel in a certain circumstance

I have the following in my app:

    <Each Items="{items}>
        // stuff

How do I apply a <ColumnLayout> on the <StackPanel> only when the screen is a certain size


You can decouple a Panel from it’s layout and use a Set to change the layout, e.g.:

<Panel ux:Name="panel">
    <StackLayout ux:Name="stackLayout" />
    <ColumnLayout ux:Name="columnLayout" ux:AutoBind="false" />
        <Set panel.Layout="stackLayout" />
        <Set panel.Layout="columnLayout" />

Note how ux:AutoBind="false" prevents the columnlayout from being added by default

@Anders this works thanks