Place a button over my map

TimothyAhlineTimothyAhline USMember
edited December 2016 in Cross Platform with Xamarin

I am very new to Xamarin and I have looked around but no luck finding a solution.
I have a map that I want to take up my whole screen. When a place an image at the top to act as a button the background around that button is greyed out. I want to make it so I don't have the white bar in the background. I have a mock up of how I want it to look and how it actually looks attached.
What I want my App to look like.

What it actually looks like.

Best Answer

Answers

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    I'd have to GUESS that you're XAML is set to be full width and expand to available space.
    But without seeing your XAML there's no way for anyone to know.

  • Clint I guess I should have included that. Here it is.
    <?xml version="1.0" encoding="utf-8" ?>

    <ContentPage>
      <StackLayout VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand">
    
         <Button Image="MenuLogo.png"  HorizontalOptions="Center" />
          <maps:Map
            x:Name="MyMap"
            IsShowingUser="true"
            MapType="Street"/>
    
        <DatePicker Date="{x:Static sys:DateTime.Now}" >
          <DatePicker.Format>yyyy-MM-dd</DatePicker.Format>
          <DatePicker.MinimumDate>
            <sys:DateTime x:FactoryMethod="Parse">
              <x:Arguments>
                <x:String>Jan 1 2000</x:String>
              </x:Arguments>
            </sys:DateTime>
          </DatePicker.MinimumDate>
          <DatePicker.MaximumDate>
            <sys:DateTime x:FactoryMethod="Parse">
              <x:Arguments>
                <x:String>Dec 31 2050</x:String>
              </x:Arguments>
            </sys:DateTime>
          </DatePicker.MaximumDate>
        </DatePicker>
      </StackLayout>
      </ContentPage>
    
    <ContentPage BackgroundImage="RegisterScreen.png">
    
    
    <StackLayout Orientation="Vertical" Padding="100,300,100,0"  >
    
    
        <Entry x:Name="username" Placeholder="username"/>
        <Entry x:Name="email" Placeholder="email"/>
        <Entry x:Name="password" Placeholder="password" IsPassword="true"/>
        <Entry x:Name="verifyPassword" Placeholder="Verify Password" IsPassword="true"/>
        <Button Text="Submit"  HorizontalOptions="Center"
              VerticalOptions="CenterAndExpand"/>
    
      </StackLayout>
    
    </ContentPage>
    
    </CarouselPage>
    
  • @FernandoBastos Thank you so much for the help. I feel like that is something I should have learned looking through layout documentation!!!

  • DineshFernandoDineshFernando USMember ✭✭

    I am trying to add a stacklayout instead of a button. How can we set it bottom aligned? setting verticle options to End doesn't help.
    Thanks

Sign In or Register to comment.