When the property panel is hidden via the auto-hide button,
controls are unloaded (the Unload event is generated). Then when
it's reshown it's loaded again (Load event). This may be the only
case where controls are loaded after being unloaded. Previously,
the code didn't seem to assume reloads would happen, clearing
out the DataContext on unload. But that seems wrong, as DataContext
isn't reset on the load, which caused controls not to work (all be
blank) in the panel hide/show scenario.
Updated to no longer null out the DataContext on unload. That fixed
this bug and doesn't seem to have any other ill effects.
When the property panel is hidden via the auto-hide button, controls are unloaded (the Unload event is generated). Then when it's reshown it's loaded again (Load event). This may be the only case where controls are loaded after being unloaded. Previously, the code didn't seem to assume reloads would happen, clearing out the DataContext on unload. But that seems wrong, as DataContext isn't reset on the load, which caused controls not to work (all be blank) in the panel hide/show scenario.
Updated to no longer null out the DataContext on unload. That fixed this bug and doesn't seem to have any other ill effects.
Fixes AB#1315193