how can stretch background content image?

How can i set the background no-repeat but stretch dinamically to all page?

Best Answer

Answers

  • SirAndriySirAndriy USMember ✭✭✭
    edited April 2016

    Create page with RelativeLayout and add there are Image with Aspect="AspectFill" and RelativeLayout.WidthConstraint= "{ConstraintExpression Type=RelativeToParent, Property=Width}" and RelativeLayout.HeightConstraint= "{ConstraintExpression Type=RelativeToParent, Property=Height}

    Something like this:


        <!-- Background -->
        <Image
            Aspect="AspectFill"
            RelativeLayout.WidthConstraint= "{ConstraintExpression Type=RelativeToParent, Property=Width}"
            RelativeLayout.HeightConstraint= "{ConstraintExpression Type=RelativeToParent, Property=Height}">
            Source = "background.png"
        </Image>
    
        <!-- Content-->
    
    </RelativeLayout>
    

  • MestParisiMestParisi ITMember
    edited April 2016

    @SirAndriy
    I have use Aspect="Fill" but the solutions is corrected! Thank's

  • Thank you SirAndriy ... you certainly saved my sorry backside with this solution ... cheers

Sign In or Register to comment.