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

Binding a member variable to a RelativeLayout XConstraint

$
0
0

I'm wanting to bind a member variable to a RelativeLayout XConstraint of a Label so that the position is changed depending the variable.

My guess (which doesn't work; it has no noticeable effect) is:

<Label
    x:Name="ProgressLabel"
    Text="{Binding ProgressLabelText}"
    TextColor="White"
    WidthRequest="70"
    HeightRequest="25"
    BackgroundColor="Aqua"
    RelativeLayout.XConstraint=
                    "{ConstraintExpression Type=Constant, 
                                                Constant={Binding ProgressLabelPosition}}"
/>

For example, if ProgressLabelPosition is 100, it should be 100 from the left.


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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