Click here to Skip to main content
16,006,348 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,


I have a custom DatePicker Control in WPF and want to be implement On the DoubleClick of DatePicker Control Display Current date in datePicker


Any one please help me how to achieve this using command in wpf.

Or How to Create MouseDoubleClick Command of DatePicker Control in wpf.

ant one please provide one small sample.
Posted
Updated 25-Jul-13 19:22pm
v2

1 solution

Use MouseDoubleClick

XAML:

XML
<pre lang="c#"><window x:class="WpfApplication38.MainWindow" xmlns:x="#unknown">
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525">
    <grid>  
        <datepicker mousedoubleclick="Control_OnMouseDoubleClick"></datepicker>
    </grid>
</window>


Codebehind:
C#
/// <summary>
   /// Interaction logic for MainWindow.xaml
   /// </summary>
   public partial class MainWindow : Window
   {
       public MainWindow()
       {
           InitializeComponent();
       }

       private void Control_OnMouseDoubleClick(object sender, MouseButtonEventArgs e)
       {
           throw new NotImplementedException();
       }
   }
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900