PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, September 13, 2022

[FIXED] How to Apply diagonal cut in imageview in xamarin cross platform?

 September 13, 2022     cross-platform, xamarin.forms     No comments   

Issue

I am new in Xamarin hybrid application. How to apply diagonal cut view in the image?

enter image description here


Solution

I have created the diagonal view from the below code.

<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" 



xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"


             x:Class="PEMS.Views.Profile"

            xmlns:xamvvm="clr-namespace:Xamvvm;assembly=Xamvvm.Forms"

            xmlns:xfShapeView="clr-namespace:XFShapeView;assembly=XFShapeView"

        xmlns:ffimageloading="clr-namespace:FFImageLoading.Forms;assembly=FFImageLoading.Forms"

         xmlns:fftransformations="clr-namespace:FFImageLoading.Transformations;assembly=FFImageLoading.Transformations"

        Title="CornersTransformation" BackgroundColor="White">

       <AbsoluteLayout HorizontalOptions="FillAndExpand" BackgroundColor="White" VerticalOptions="FillAndExpand">

        <ffimageloading:CachedImage
            AbsoluteLayout.LayoutBounds="0,0,1,.5"
            AbsoluteLayout.LayoutFlags="All"
            Aspect="AspectFill"
            Source="profile_background.png" 
            />

        <xfShapeView:ShapeView
            AbsoluteLayout.LayoutBounds="1,.5,400, 1600"
            AbsoluteLayout.LayoutFlags="PositionProportional"
            HorizontalOptions="Center"
            Rotation="-90"
            ShapeType="Triangle"
            WidthRequest="400"
            Color="White" />

        <Label
            AbsoluteLayout.LayoutBounds=".6,.6,.5,.1"
            AbsoluteLayout.LayoutFlags="All"
            FontSize="34"
            HorizontalOptions="End"
            LineBreakMode="WordWrap"
            Text="Some content here."
            TextColor="White" />

    </AbsoluteLayout>
</ContentPage>


Answered By - ARS VISIONS
Answer Checked By - David Marino (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing