Hi I have a tab control which is bound to a collection property of Type T through the ItemSource
The content template has bunch of lablels and textboxes bound to individual properties of the Type T.
When I try to implement reset functionality by reinitializing the ObservableCollection ( new ObservableCollection(){new T()}. I hoped it would totally reinitialize the control
However in a strange behavior, the whole content template disappears when I do that. Even more strangely, if I press the reset button again the content template reappears. It alternates between this behavior.
I know its a very strange behavior and hoping for some tips from everyone
I think instead of making a new collection, you can just clear() the existing one. Because it’s an observablecollection, the tab control will get the events and will change the ui appropriately.