Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Linking Assemblies leads to Binding Property not updating

LateralusLateralus Member ✭✭
edited November 2019 in Xamarin.Forms

In my Xamarin.Forms app, there is an issue when creating the Release build:

In MyView.xaml, I have a Label with a Text binding:

<Label Text="{Binding ProgressInfo.Message, Mode=TwoWay}" />

In MyViewModel.cs I have the Property:

private (double Value, string Message) progressInfo;
public ( double TotalProgressInPct, string Message) ProgressInfo { get => progressInfo; set => SetProperty(ref progressInfo, value); }

where SetProperty is from a different assembly (MvvmHelpers)

The update of the text label works fine with No Linking, but not with Link SDK Assemblies, where the Label text does not update. All other Labels are updated just fine.

For some reason, the tuple character of the property does not work nice with the Linker? Thankful for any hints!



  • ColeXColeX Member, Xamarin Team Xamurai
    edited November 2019

    Check Linker Behavior .

    As the documentation mentioned ,

    The Link SDK Assemblies option only links assemblies that come with Xamarin.Android. All other assemblies (such as your code) are not linked.

    so it's the reason property does not update i think , switch it to Don't Link .

  • LateralusLateralus Member ✭✭

    Switching to "Don't link will bloat my store upload from 13 to 30 MB. I think there should be some other way ...
    I am also not sure why your link to the documentation explains why the property does not update ...

Sign In or Register to comment.