Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Set RelativeLayout constraint expression from code

$
0
0

How do i change the RelativeLayout of a view from code? I have this XAML:

<StackLayout
                    x:Name="SemiLayout"
                    RelativeLayout.HeightConstraint = 
                        "{ConstraintExpression Type=RelativeToParent,
                                               Property=Height,
                                               Factor=1}"

                    RelativeLayout.WidthConstraint = 
                        "{ConstraintExpression Type=RelativeToParent,
                                               Property=Width,
                                               Factor=1}">
                </StackLayout>

How do i change the constraint expression from code? I didn't find anything related to this in the forum.


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>