How to design a frame over the login form(stack layout) RRS feed

  • Question

  • User382967 posted

    If I click the info icon, it should be display the info text on the top of login form. How can I achieve this in XAML(Xamarin Forms)?

    Wednesday, December 16, 2020 8:05 PM

All replies

  • User380187 posted

    @Mohanasundharam Hi, if you are using StackLayout as the Root Layout, it seems not be possible to achieve that. However, you could use RelativeLayout to make the text view relatively display beside the icon .

    For example:

    <RelativeLayout x:Name="RootView"> ... <Image x:Name="icon" Source="icon.png"/> ... <Label Text="sample text" RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=icon, Property=X, Constant=10}" RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=icon, Property=Y, Constant=0}" RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=RootView, Property=Width, Factor=0.33}" RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=RootView, Property=Height, Factor=0.33}" /> ... </RelativeLayout>

    Thursday, December 17, 2020 7:46 AM