public DatePickerCtrl() { this.Height = 22; LayoutRoot = new Grid(); m_Picker = new DatePickerEx(); m_Picker.CalendarOpened += new RoutedEventHandler(Picker_CalendarOpened); m_Picker.CalendarClosed += new RoutedEventHandler(Picker_CalendarClosed); m_Picker.SelectedDateChanged += new EventHandler <SelectionChangedEventArgs>(Picker_SelectedDateChanged); m_Picker.DisplayDateChanged += new EventHandler(Picker_DisplayDateChanged); m_Picker.Text = String.Empty; m_Picker.DisplayDate = DateTime.Today; LayoutRoot.Children.Add(m_Picker); this.Content = LayoutRoot; }
public DatePickerCtrl() { this.Height = 22; LayoutRoot = new Grid(); m_Picker = new DatePickerEx(); m_Picker.CalendarOpened += new RoutedEventHandler(Picker_CalendarOpened); m_Picker.CalendarClosed += new RoutedEventHandler(Picker_CalendarClosed); m_Picker.SelectedDateChanged += new EventHandler<SelectionChangedEventArgs>(Picker_SelectedDateChanged); m_Picker.DisplayDateChanged += new EventHandler(Picker_DisplayDateChanged); m_Picker.Text = String.Empty; m_Picker.DisplayDate = DateTime.Today; LayoutRoot.Children.Add(m_Picker); this.Content = LayoutRoot; }