Open DropDown in full screen
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
SIGN IN To post a reply.
4 Replies
DR
Durga Rajan
Syncfusion Team
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.
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.
MS
Matt Shanahan
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
MS
Matt Shanahan
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;
}
}
DR
Durga Rajan
Syncfusion Team
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.
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.
SIGN IN To post a reply.
- 4 Replies
- 2 Participants
-
MS Matt Shanahan
- May 31, 2016 12:24 AM UTC
- Jun 1, 2016 11:19 AM UTC