Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[WPF] Open DatePicker when control receives focus (to match other platforms) #11087

Merged
merged 7 commits into from
Aug 17, 2020
Merged

[WPF] Open DatePicker when control receives focus (to match other platforms) #11087

merged 7 commits into from
Aug 17, 2020

Conversation

peterfoot
Copy link
Contributor

Description of Change

Fixes consistency with other platforms. When the control receives keyboard focus open the dropdown.

Issues Resolved

API Changes

None

Platforms Affected

  • WPF

Behavioral/Visual Changes

Previously the control would only open when user tapped on the calendar button. Now the control opens automatically when you call Focus() on it programmatically.

Before/After Screenshots

Not applicable

Testing Procedure

Use the control gallery app
Go to DatePicker Gallery
Select Focus test
Press the button to set focus to the DatePicker and observe the drop-down calendar is displayed

PR Checklist

  • Targets the correct branch
  • Tests are passing (or failures are unrelated)

@jsuarezruiz
Copy link
Contributor

@peterfoot There is a small conflict, could you review it?

@samhouts samhouts changed the base branch from master to 4.8.0 June 25, 2020 23:59
@samhouts samhouts changed the base branch from 4.8.0 to 5.0.0 August 4, 2020 22:18
@samhouts samhouts added this to the 5.0.0 milestone Aug 4, 2020
Copy link

@riverar riverar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to make some minor edits to get this to compile, see review.

@@ -1,12 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add using System;, required for Uri
Add using System.Windows.Media;, required for FontFamily

@samhouts samhouts merged commit 5edac1f into xamarin:5.0.0 Aug 17, 2020
myroot pushed a commit to myroot/Xamarin.Forms that referenced this pull request Aug 19, 2020
…tforms) (xamarin#11087)

* Added automatic opening of the control on keyboard focus for consistency with iOS/Android etc.

* Merged remote and fixed missing using statements

Co-authored-by: Samantha Houts <samhouts@users.noreply.github.com>

fixes xamarin#10358
sung-su pushed a commit to sung-su/Xamarin.Forms that referenced this pull request Aug 20, 2020
…tforms) (xamarin#11087)

* Added automatic opening of the control on keyboard focus for consistency with iOS/Android etc.

* Merged remote and fixed missing using statements

Co-authored-by: Samantha Houts <samhouts@users.noreply.github.com>

fixes xamarin#10358
sung-su pushed a commit to sung-su/Xamarin.Forms that referenced this pull request Aug 20, 2020
…tforms) (xamarin#11087)

* Added automatic opening of the control on keyboard focus for consistency with iOS/Android etc.

* Merged remote and fixed missing using statements

Co-authored-by: Samantha Houts <samhouts@users.noreply.github.com>

fixes xamarin#10358
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] [WPF] Datepicker's calendar not show when we call Datepicker.Focus() in WPF
5 participants