wolfman1001 wolfman1001 - 3 months ago 33
C# Question

UWP keep binding when parent object is changed

If I have an object e.g. a Person object with two strings name and email address, have an instance of the object called user and have bound the properties like so

<TextBlock Text="{x:Bind Path=User.Name, Mode=OneWay}"></TextBlock>

<TextBlock Text="{x:Bind Path=User.Email, Mode=OneWay}"></TextBlock>

Is there a way to keep the binding when setting user to a new instance of the person class?

The reason is that I am planning to do this with objects that have a very large number of property's and are returned from an api so I wanted to avoid having to replace each property individually


called after object change should do the work