LeonelUrra

Badges

5 LikesFirst CommentPhotogenic

About

Username
LeonelUrra
Location
US
Joined
Visits
8
Last Active
Roles
Member
Points
13
Badges
3

LeonelUrra

About

Username
LeonelUrra
Location
US
Joined
Visits
8
Last Active
Roles
Member
Points
13
Badges
3
  • Re: Image As Background

    In this code example background image and form centered with xaml

    <AbsoluteLayout>
    
            <Image x:Name="BgImage" Source="Uri_to_image"
                   Aspect="AspectFill"
                   AbsoluteLayout.LayoutBounds="0.0, 0.0, 1.0, 1.0"
                   AbsoluteLayout.LayoutFlags="All"/>
    
            <StackLayout
                AbsoluteLayout.LayoutBounds="0.0, 0.0, 1.0, 1.0"
                AbsoluteLayout.LayoutFlags="All">
    
                <Frame OutlineColor="Accent" 
                       WidthRequest="300" 
                       HorizontalOptions="Center"
                       VerticalOptions="CenterAndExpand">
                    <StackLayout>
                        <Entry Placeholder="Name" />
                        <Entry Placeholder="Email"/>
                    </StackLayout>
                </Frame>
            </StackLayout>
    
    </AbsoluteLayout>
    

  • Re: Is there a way to position the center of an element somewhere?

    In this code example background image and form centered

    <AbsoluteLayout>
    
            <Image x:Name="BgImage" Source="Uri_to_image"
                   Aspect="AspectFill"
                   AbsoluteLayout.LayoutBounds="0.0, 0.0, 1.0, 1.0"
                   AbsoluteLayout.LayoutFlags="All"/>
    
            <StackLayout
                AbsoluteLayout.LayoutBounds="0.0, 0.0, 1.0, 1.0"
                AbsoluteLayout.LayoutFlags="All">
    
                <Frame OutlineColor="Accent" 
                       WidthRequest="300" 
                       HorizontalOptions="Center"
                       VerticalOptions="CenterAndExpand">
                    <StackLayout>
                        <Entry Placeholder="Name" />
                        <Entry Placeholder="Email"/>
                    </StackLayout>
                </Frame>
            </StackLayout>
    
        </AbsoluteLayout>