Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xamarin/Xamarin.PropertyEditing.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBret Johnson <bret.johnson@microsoft.com>2021-08-26 08:31:10 +0300
committerBret Johnson <bret.johnson@microsoft.com>2021-08-26 08:38:56 +0300
commit776e7b4d72d55398e0f196d34a9d98893e8ab923 (patch)
tree0c03f1526dda8ede39cbb974ead5dd4550737f44
parent6c9da339b667a742ce57d3418a1c071178343a41 (diff)
Support PropertyPresenter being unloaded & reloaded
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
-rwxr-xr-x[-rw-r--r--]Xamarin.PropertyEditing.Windows/PropertyPresenter.cs1
1 files changed, 0 insertions, 1 deletions
diff --git a/Xamarin.PropertyEditing.Windows/PropertyPresenter.cs b/Xamarin.PropertyEditing.Windows/PropertyPresenter.cs
index 8d7211e..4cf1813 100644..100755
--- a/Xamarin.PropertyEditing.Windows/PropertyPresenter.cs
+++ b/Xamarin.PropertyEditing.Windows/PropertyPresenter.cs
@@ -168,7 +168,6 @@ namespace Xamarin.PropertyEditing.Windows
private void OnUnloaded (object sender, RoutedEventArgs e)
{
IsSubProperty = false;
- DataContext = null;
}
private void OnDataContextChanged (object sender, DependencyPropertyChangedEventArgs e)