summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla52266.cs38
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems1
-rw-r--r--Xamarin.Forms.Platform.WinRT/PickerRenderer.cs19
3 files changed, 0 insertions, 58 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla52266.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla52266.cs
deleted file mode 100644
index ab95f98f..00000000
--- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla52266.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-using Xamarin.Forms.CustomAttributes;
-using Xamarin.Forms.Internals;
-
-#if UITEST
-using Xamarin.UITest;
-using NUnit.Framework;
-#endif
-
-namespace Xamarin.Forms.Controls.Issues
-{
- [Preserve(AllMembers = true)]
- [Issue(IssueTracker.Bugzilla, 52266, "[WinRT/UWP] Picker.Focus() does not open the dropdown", PlatformAffected.WinRT)]
- public class Bugzilla52266 : TestContentPage
- {
- protected override void Init()
- {
- var picker = new Picker
- {
- ItemsSource = new string[] { "A", "B", "C" }
- };
- Content = new StackLayout
- {
- Children =
- {
- picker,
- new Button
- {
- Text = "Click to focus the picker",
- Command = new Command(() =>
- {
- picker.Focus();
- })
- }
- }
- };
- }
- }
-} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
index 4f41a1fb..07cea4fd 100644
--- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
@@ -206,7 +206,6 @@
<DependentUpon>Bugzilla51642.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
- <Compile Include="$(MSBuildThisFileDirectory)Bugzilla52266.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla53445.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla55714.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla54649.cs" />
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;
}
}