We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Open DropDown in full screen

Thread ID:

Created:

Updated:

Platform:

Replies:

124302 May 31,2016 12:24 AM UTC Jun 1,2016 11:19 AM UTC WinRT 4
loading
Tags: SfDatePicker
Matt Shanahan
Asked On May 31, 2016 12:24 AM UTC

Hello, I'm currently switching over all of my controls to use the Syncfusion controls and have so far found it very easy to switch. When testing, I discovered that the dropdown can open in an undesirable position, such as either off the screen or with the Ok/Cancel buttons hidden. I've attached a screenshot showing the position of my controls and what it looks like when opened.

Is there a way to force the dropdown to open in full screen mode? This is how my previous control implementation worked and I never had an issue. Thank you!

Attachment: DatePicker_615d1dfe.zip

Durga Rajan [Syncfusion]
Replied On May 31, 2016 09:00 AM UTC

Hi Matt,

Thank you for using Syncfusion products.

We have checked the reported issue by placing SfDatePicker at bottom and prepared a sample that tries to meet your requirement. In this sample, we have moved the Popup containing SfDateSelector up by setting new top Margin for the popup used in SfDatePicker when BottomAppBar exists. So that BottomAppBar will not hide the popup. You can download the same from the following link:

Sample:
Datepicker_AppBar_sample


Regards,
Durga S.

Matt Shanahan
Replied On May 31, 2016 03:28 PM UTC

Thank you. This should work, but hard-coding a margin value seems hacky, especially given different screen sizes the app will need to respond to. Is there a way to force it to open full-screen as in the following screencap?

Thanks,
Matt

Matt Shanahan
Replied On May 31, 2016 03:39 PM UTC

Ok, I found a solution based on your example. The following will open up a full-width pop-up, centered vertically.

private void picker_Loaded(object sender, RoutedEventArgs e)

{

if (BottomAppBar != null && picker != null)

{

foreach (Popup popup in VisualUtils.FindVisualChildrenOfType<Popup>(picker))

{

if (popup != null && popup.Name == "PART_DropDown")

{

popup.Width = Window.Current.Bounds.Width;

popup.Height = Window.Current.Bounds.Height;

//popup.Margin = new Thickness(0, -BottomAppBar.Height, 0, 0);

break;

}

}

picker.Loaded -= picker_Loaded;

}

}


Durga Rajan [Syncfusion]
Replied On June 1, 2016 11:19 AM UTC

Hi Matt,

We are glad to hear that the reported issue has been fixed at your end. Please let us know if you need any other assistance on this.

Regards,
Durga S.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;