Search code examples
windows-phone-8datepickerxamarin.forms

Programmatically open DatePicker in Xamarin.Forms


I want to use GestureRecogniser on an Image to open DatePicker in Xamarin.Forms. I know the TapGestureRecogniser part. How do I programmatically open DatePicker in Xamarin.Forms ?

Note: The real reason behind this is I dont want Border that comes with WinPhone's DatePicker


Solution

  • The real reason behind this is I dont want Border that comes with WinPhone's DatePicker

    You should be able to disable border with a custom renderer for Windows platform (https://developer.xamarin.com/guides/cross-platform/xamarin-forms/custom-renderer/)

    How do I programatically open DatePicker in Xamarin.Forms ?

    DateTimePicker.Focus();