HomeiOS Development.NET MAUI Binding to a different aspect's property does not work on...

.NET MAUI Binding to a different aspect’s property does not work on iOS


I’ve this code in my XAML:

<VerticalStackLayout Grid.Row="1"
                     Grid.Column="0">
    <Label x:Title="lblDistanceText"
       Textual content="Distance"
       FontSize="Medium"
       FontAttributes="Daring"
       VerticalOptions="CenterAndExpand"
       HorizontalOptions="Heart"
       Margin="0,0,0,0"/>
    <Line Stroke="DarkGreen"
          StrokeThickness="3"
          StrokeLineCap="Spherical"
          Opacity="0.85"
          HorizontalOptions="Heart"
          X2="{Binding Supply={x:Reference lblDistanceText}, Path=Width}">
        <Line.Shadow>
            <Shadow Brush="DarkGreen"
                Offset="0,0"
                Radius="6"
                Opacity="0.9" />
        </Line.Shadow>
    </Line>
    <Label 
       Textual content="{Binding TotalDistance}"
       FontSize="Medium"
       FontAttributes="Daring"
       VerticalOptions="CenterAndExpand"
       HorizontalOptions="Heart"
       Margin="0,0,0,0"/>
</VerticalStackLayout>

It attracts the inexperienced line that underlines the “Distance” textual content.

It really works high quality on Android however does not work on iOS.

Right here is the way it seems to be on iOS:

iOS bug

I’ve examined this on simulator and a couple of actual gadgets – identical consequence.
Breakpoint is not hit on the binding.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments