Move .net maui contents below the drawer when it's opened

29 Views Asked by At

I made one that opens a drawer by clicking on it but when it opens, all the contents below such as those checkboxes and butto also move down. I just started working with .net maui and I can't fix this in any way.

<VerticalStackLayout>

    <Button Text="Choose One" Clicked="OpenDrawer" Margin="98,1,98,4"/>
    <Frame x:Name="Drawer" IsOpen="False" Padding="10" Margin="98,0,98,3">
        <StackLayout>
            <Button Text="option1" TextColor="Black" Clicked="Option1_Clkd"/>
            <Button Text="option2" TextColor="Black" Clicked="Option2_Clkd" Margin="0,1"/>
            <Button Text="option3" TextColor="Black" Clicked="Option3_Clkd" Margin="0,1"/>
        </StackLayout>
    </Frame>
    <Frame CornerRadius="10" Padding="0" Margin="98,0,98,3">
        <StackLayout Orientation="Horizontal" VerticalOptions="CenterAndExpand" HorizontalOptions="Start">
            <CheckBox x:Name="OCheckBox" CheckedChanged="CheckBox_Chckd"/>
            <Label Text="Option1" VerticalOptions="Center" HorizontalOptions="Start"/>
            <CheckBox x:Name="CCheckBox" CheckedChanged="CheckBox_Chckd"/>
            <Label Text="Option2"VerticalOptions="Center" HorizontalOptions="Start"/>
        </StackLayout>
    </Frame>
    <Frame CornerRadius="10" Padding="0" Margin="98,0,98,3">
        <Button Text="Submit" Clicked="SubmitBtn_Clkd" />
    </Frame>

</VerticalStackLayout>

I tried ways to make them not move after opening the drawer but didn't help, I really don't know what to do. I appreciate your help in advance.

0

There are 0 best solutions below