Hi,
I have a XamDateTimeEditor. I want to open the Calendar if i click anywhere inside the XamDateTimeEditor and on the next immediate click it has to close. I tried this by setting IsDropDownOpen property in PreviewMouseDown event. It opens only when control doesn't have a focus. If control already has focus then it is not working. Let me know is there any other simple way to do this...
Thanks
Kumaran
Hello kumaran,
I am just checking if my last reply was helpful for you.
If you require any further assistance please do not hesitate to ask.
Hello kumaran,I have been looking into your post and I can suggest you implement the following code in the body of the ‘PreviewMouseLeftButtonDown’ event of the XamDateTimeEditor :
private void editor_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
if (editor.IsDropDownOpen == false)
Dispatcher.BeginInvoke(new Action(() =>
editor.IsDropDownOpen = true;
}), System.Windows.Threading.DispatcherPriority.SystemIdle, null);
}
else if (editor.IsDropDownOpen == true)
editor.IsDropDownOpen = false;
If you need any further assitance on this matter, feel free to ask.