C#C
C#3y ago
Daltz333

❔ Do static two way bindings leak XAML?

To summarize, does the following leak the ContentPage here:
<ContentPage>
  <Label Text="{Binding Source={x:Static mySingleTon.Instance}, Path=myproperty}"/>
</ContentPage>


If so, would this be an appropriate replacement, or the same issue?
public partial class MyViewModel : ObservableObject {
  [ObservableProperty]
  public MyObject ObjectA {
    get => return mySingleton.Instance.myproperty;
  }
}


Replacement paradigms would be useful.
Was this page helpful?