Forum Xamarin.Forms

Set background image and opacity but not the text in the screen

JenalynParagadosJenalynParagados USMember ✭✭
edited June 2018 in Xamarin.Forms

I have set an image as background in the Content Page

But the text or labels inside it affecting the opacity even though I have set the stacklayout opacity to 1. Everything in the screen applied by the opacity i have set in the background image. My goal is to set a background image as water mark to the login screen thats why I need to set the background image into opacity.

<ContentPage xmlns=""
            <StackLayout Opacity="1">
                <StackLayout Padding="15">
                    <Image Aspect="AspectFit" Source="truck_black.png"
                            WidthRequest="130" HeightRequest="100"/>
                    <StackLayout Spacing="0">
                        <StackLayout Padding="15,7,15,15" VerticalOptions="StartAndExpand">
                            <StackLayout VerticalOptions="StartAndExpand">
                                <Label Text="Company Code" TextColor="Black" FontSize="14"/>
                                <Entry x:Name="companyCodeEntry" TextColor="Black" Text="" FontSize="14"/>
                                <Label Text="Username" TextColor="Black" FontSize="14"/>
                                <Entry x:Name="usernameEntry" TextColor="Black" Text="" FontSize="14"/>
                                <Label Text="Password" TextColor="Black" FontSize="14"/>
                                <Entry x:Name="passwordEntry" IsPassword="true" TextColor="Black" Text="" FontSize="14"/>

Best Answer


Sign In or Register to comment.