Xamarin按钮随背景图像消失

时间:2018-08-11 23:06:45

标签: xamarin xamarin.forms xamarin.android

我在Xamarin!中的背景图片和按钮有问题! when i start device with android on resolution 1440x2560 560dpi the background and the buttons works fine!

But when I start a device android on resoluton 768x1280 the buttons disappear LOL

有人可以告诉我怎么回事吗?

我的MainPage.xaml代码

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
         xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
         xmlns:local="clr-namespace:Soller"
         x:Class="Soller.MainPage"
         NavigationPage.HasNavigationBar="False"
         BackgroundImage="Background.png">

<StackLayout>
    <Frame WidthRequest="300"
                   HeightRequest="40"
                   HorizontalOptions="Center"
                   Padding="0"
                   BorderColor="White"
                   CornerRadius="30"
                   HasShadow="False"
                   Margin="5,19,10,400"
                   TranslationX="0"
                   TranslationY="400">
        <Label Text="SOU INFLUENCIADOR" HorizontalOptions="Center" Margin="5,14,10,10" FontSize="Micro" TextColor="Black"/>
        <Frame.GestureRecognizers>
            <TapGestureRecognizer Tapped="Sou_Influenciador"/>
        </Frame.GestureRecognizers>
    </Frame>
    <Frame WidthRequest="300"
                   HeightRequest="40"
                   HorizontalOptions="Center"
                   Padding="0"
                   BorderColor="White"
                   CornerRadius="30"
                   HasShadow="False"
                   Margin="5,19,10,100">
        <Label Text="SOU MARCA" HorizontalOptions="CenterAndExpand" Margin="5,14,10,10" FontSize="Micro" TextColor="Black"/>
        <Frame.GestureRecognizers>
            <TapGestureRecognizer Tapped="Sou_Marca"/>
        </Frame.GestureRecognizers>
    </Frame>
</StackLayout>

0 个答案:

没有答案