Неправильное отображение MasterDelailPage при открытой клавиатуре

всем молодым и талантливым. Разрабатываю приложение на Xamarin Forms. И у меня есть меню, которое реализовано с помощью MasterDelailPage. Когда я открываю клавиатуру, чтобы написать что-нибудь в Entry, которое находится на странице чата, у меня есть возможность открыть мое меню. введите сюда описание изображения

И если открыть меню при открытой клавиатуре, то меню улетает вверх и верхнюю часть его не видно. (Ниже представлен пример) введите сюда описание изображения

Ниже прикрепляю код самого меню:

<MasterDetailPage.Master>
        <ContentPage Title="Master" >
            <ContentPage.Content>
                <StackLayout Padding="0,5,5,5" >
                    <StackLayout HorizontalOptions="FillAndExpand" VerticalOptions="Start" HeightRequest="70" Orientation="Horizontal" Padding="10">
                        <Image WidthRequest="65" HeightRequest="65" Aspect="AspectFit" Source="gu.jfif" VerticalOptions="Center"></Image>
                        <Label x:Name="Name_user" VerticalOptions="CenterAndExpand" TextColor="Black" HorizontalTextAlignment="Center" HorizontalOptions="StartAndExpand" BackgroundColor="Transparent"  FontSize="17" ></Label>
                    </StackLayout>

                    <StackLayout x:Name="Stack_Schedule" Orientation="Horizontal" HorizontalOptions="FillAndExpand" HeightRequest="50" Padding="10,0,0,0">
                        <StackLayout.GestureRecognizers>
                            <TapGestureRecognizer x:Name="TapSchedule" NumberOfTapsRequired="1" />
                        </StackLayout.GestureRecognizers>
                        <Image WidthRequest="30" HeightRequest="30" Aspect="AspectFit"  Source="schudele.png" HorizontalOptions="Start" ></Image>
                        <Button x:Name="Text_Schedule" Text="Расписание"  Clicked="Button_Schedule" FontSize="18" VerticalOptions="Center" BackgroundColor="Transparent" HorizontalOptions="StartAndExpand"></Button>
                    </StackLayout>

                    <StackLayout x:Name="Stack_Chatting" Orientation="Horizontal" HorizontalOptions="FillAndExpand"  HeightRequest="50" Padding="10,0,0,0">
                        <StackLayout.GestureRecognizers>
                            <TapGestureRecognizer x:Name="TapChatting" NumberOfTapsRequired="1" />
                        </StackLayout.GestureRecognizers>
                        <Image WidthRequest="30" HeightRequest="30" Aspect="AspectFit" Source="chat.png" HorizontalOptions="Start"></Image>
                        <Button x:Name="Text_Chatting" Text="Чат" Clicked="Button_Chatting"  FontSize="18" VerticalOptions="Center" BackgroundColor="Transparent" HorizontalOptions="StartAndExpand"></Button>
                    </StackLayout>

                    <StackLayout x:Name="Stack_Teachers" Orientation="Horizontal" HorizontalOptions="FillAndExpand"  HeightRequest="50" Padding="10,0,0,0">
                        <StackLayout.GestureRecognizers>
                            <TapGestureRecognizer x:Name="TapTeachers" NumberOfTapsRequired="1" />
                        </StackLayout.GestureRecognizers>
                        <Image WidthRequest="30" HeightRequest="30" Aspect="AspectFit" Source="teachers.jpg" HorizontalOptions="Start"></Image>
                        <Button x:Name="Text_Teachers" Text="Преподаватели" Clicked="Button_Teachers"  VerticalOptions="Center" BackgroundColor="Transparent" FontSize="18" HorizontalOptions="StartAndExpand"></Button>
                    </StackLayout>

                    <StackLayout x:Name="Stack_Maxs" Orientation="Horizontal" HorizontalOptions="FillAndExpand"  HeightRequest="50" Padding="10,0,0,0">
                        <StackLayout.GestureRecognizers>
                            <TapGestureRecognizer x:Name="TapMaxs" NumberOfTapsRequired="1" />
                        </StackLayout.GestureRecognizers>
                        <Image WidthRequest="30" HeightRequest="30" Aspect="AspectFit" Source="grades1.png" HorizontalOptions="Start"></Image>
                        <Button x:Name="Text_Maxs" Text="Мои оценки" Clicked="Button_Maxs" FontSize="18" VerticalOptions="Center" BackgroundColor="Transparent" HorizontalOptions="StartAndExpand"></Button>
                    </StackLayout>

                    <StackLayout x:Name="Stack_Documents" Orientation="Horizontal" HorizontalOptions="FillAndExpand"  HeightRequest="50" Padding="10,0,0,0">
                        <StackLayout.GestureRecognizers>
                            <TapGestureRecognizer x:Name="TapDocuments" NumberOfTapsRequired="1" />
                        </StackLayout.GestureRecognizers>
                        <Image WidthRequest="30" HeightRequest="30" Aspect="AspectFit" Source="document.png" HorizontalOptions="Start"></Image>
                        <Button x:Name="Text_Documents" Text="Мои документы" Clicked="Button_Documents" FontSize="18" VerticalOptions="Center" BackgroundColor="Transparent" HorizontalOptions="StartAndExpand"></Button>
                    </StackLayout>

                    <StackLayout x:Name="Stack_Settings" Orientation="Horizontal" HorizontalOptions="FillAndExpand" HeightRequest="50" Padding="10,0,0,0">
                        <StackLayout.GestureRecognizers>
                            <TapGestureRecognizer x:Name="TapSettings" NumberOfTapsRequired="1" />
                        </StackLayout.GestureRecognizers>
                        <Image WidthRequest="30" HeightRequest="30" Aspect="AspectFit" Source="settings.png" HorizontalOptions="Start"></Image>
                        <Button x:Name="Text_Settings" Text="Настройки" Clicked="Button_Settings" VerticalOptions="Center"  BackgroundColor="Transparent" FontSize="18" HorizontalOptions="StartAndExpand"></Button>
                    </StackLayout>
                    <StackLayout Orientation="Horizontal" HorizontalOptions="FillAndExpand" HeightRequest="50" Padding="10,0,0,0">
                        <StackLayout.GestureRecognizers>
                            <TapGestureRecognizer x:Name="TapExit" NumberOfTapsRequired="1" />
                        </StackLayout.GestureRecognizers>
                        <Image WidthRequest="30" HeightRequest="30" Aspect="AspectFit" Source="exit.jpg"  HorizontalOptions="Start"></Image>
                        <Button  Text="Выход" Clicked="Button_Exit" VerticalOptions="Center" BackgroundColor="Transparent" TextColor="Red"  FontSize="18" HorizontalOptions="StartAndExpand"></Button>
                    </StackLayout>
                    <BoxView HorizontalOptions="FillAndExpand" VerticalOptions="EndAndExpand" Color="LightGray" HeightRequest="2"/>
                    <StackLayout Orientation="Horizontal" VerticalOptions="End" HorizontalOptions="FillAndExpand" HeightRequest="50" Padding="10,0,0,0">
                        <StackLayout.GestureRecognizers>
                            <TapGestureRecognizer x:Name="TapFeedBack" NumberOfTapsRequired="1" />
                        </StackLayout.GestureRecognizers>
                        <Image WidthRequest="30" HeightRequest="30" Aspect="AspectFit" Source="feedback.png"  HorizontalOptions="Start"></Image>
                        <Button  Text="Обратная связь" Clicked="Button_Feedback" VerticalOptions="Center" BackgroundColor="Transparent" FontSize="18" HorizontalOptions="FillAndExpand"></Button>
                    </StackLayout> 
                </StackLayout>
            </ContentPage.Content>
        </ContentPage>
    </MasterDetailPage.Master>

И вот вопрос, как можно исправить этот баг? Можно ли, например, заблокировать вызов Master, пока открыта клавиатура или не сдвигать меню, если ты открываешь его при открытой клавиатуре? Спасибо за ответы!


Ответы (0 шт):