c# - Why Does Binding to a Struct Not Work? -
i've encountered issue have observablecollection bound listview. people structure have written. long set value(s) of people objects prior binding, seems work ok. however, when try set values gui @ runtime, underlying objects not seem reflect change.
i overcame problem changing people structure class. no other changes necessary.
can please explain me why is?
your binding gets copy of struct since structs passed value methods. if binding updates something; copy in memory somewhere being modified , hence original object of yours not updated.
Comments
Post a Comment