summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.WinRT/PickerRenderer.cs
diff options
context:
space:
mode:
authorPaul DiPietro <pauldipietro@users.noreply.github.com>2017-09-12 08:15:22 -0400
committerSamantha Houts <samantha.houts@xamarin.com>2017-09-14 17:59:22 -0700
commitd99e76c7979b16cea16159ee449c8573fa48a0ac (patch)
tree384aaa566482ef4d76b39e32cf955f83ffa4b16c /Xamarin.Forms.Platform.WinRT/PickerRenderer.cs
parentb8cfed30e530edd1c13ff2f5b68805258c5f3b48 (diff)
downloadxamarin-forms-d99e76c7979b16cea16159ee449c8573fa48a0ac.tar.gz
xamarin-forms-d99e76c7979b16cea16159ee449c8573fa48a0ac.tar.bz2
xamarin-forms-d99e76c7979b16cea16159ee449c8573fa48a0ac.zip
Revert PR #762 (#1134)
Diffstat (limited to 'Xamarin.Forms.Platform.WinRT/PickerRenderer.cs')
-rw-r--r--Xamarin.Forms.Platform.WinRT/PickerRenderer.cs19
1 files changed, 0 insertions, 19 deletions
diff --git a/Xamarin.Forms.Platform.WinRT/PickerRenderer.cs b/Xamarin.Forms.Platform.WinRT/PickerRenderer.cs
index d4ee918e..a7aa16f0 100644
--- a/Xamarin.Forms.Platform.WinRT/PickerRenderer.cs
+++ b/Xamarin.Forms.Platform.WinRT/PickerRenderer.cs
@@ -19,7 +19,6 @@ namespace Xamarin.Forms.Platform.WinRT
{
bool _isAnimating;
Brush _defaultBrush;
- bool _dropDownWasOpened;
protected override void Dispose(bool disposing)
{
@@ -33,7 +32,6 @@ namespace Xamarin.Forms.Platform.WinRT
Control.DropDownClosed -= OnDropDownOpenStateChanged;
Control.OpenAnimationCompleted -= ControlOnOpenAnimationCompleted;
Control.Loaded -= ControlOnLoaded;
- Control.GotFocus -= ControlOnGotFocus;
}
}
@@ -53,7 +51,6 @@ namespace Xamarin.Forms.Platform.WinRT
Control.OpenAnimationCompleted += ControlOnOpenAnimationCompleted;
Control.ClosedAnimationStarted += ControlOnClosedAnimationStarted;
Control.Loaded += ControlOnLoaded;
- Control.GotFocus += ControlOnGotFocus;
}
Control.ItemsSource = ((LockableObservableListWrapper)Element.Items)._list;
@@ -105,19 +102,6 @@ namespace Xamarin.Forms.Platform.WinRT
}
}
- void ControlOnGotFocus(object sender, RoutedEventArgs routedEventArgs)
- {
- // The FormsComboBox is separate from the Popup/dropdown that it uses to select an item,
- // and the behavior here is changed to be similar to the other platforms where focusing the
- // Picker opens the dropdown (with the exception where if focus was given via keyboard, such
- // as tabbing through controls). The _dropDownWasOpened flag is reset to false in the case that
- // the FormsComboBox regained focus after the dropdown closed.
- if (!_dropDownWasOpened && Control.FocusState != FocusState.Keyboard)
- Control.IsDropDownOpen = true;
- else
- _dropDownWasOpened = false;
- }
-
void OnControlSelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (Element != null)
@@ -145,9 +129,6 @@ namespace Xamarin.Forms.Platform.WinRT
_isAnimating = false;
// and force the final redraw
((IVisualElementController)Element)?.InvalidateMeasure(InvalidationTrigger.MeasureChanged);
-
- // Related to ControlOnGotFocus, _dropDownWasOpened is set to true
- _dropDownWasOpened = true;
}
}