Example #1
0
        public DateTimePicker() : base()
        {
            StackPanel pnl = new StackPanel();
            InnerDatePicker  = new SmtDatePicker();
            InnerTimePicker  = new TimePicker();
            //InnerTimePicker.Width = 50;
            //StackPanel spSpliter = new StackPanel();
            //spSpliter.Width = 5;
            pnl.Orientation = Orientation.Horizontal;

            InnerDatePicker.Style = Application.Current.Resources["DatePickerStyle"] as Style;
            InnerDatePicker.Margin = new Thickness(0, 0, 5, 0);
            InnerTimePicker.Style = Application.Current.Resources["TimePickerStyle"] as Style;
            //InnerDatePicker.MaxWidth = 300;
            InnerDatePicker.MinWidth = 110;
            //InnerTimePicker.MinWidth = 270;
            //InnerTimePicker.MaxWidth = 110;
            //InnerTimePicker.FlowDirection = System.Windows.FlowDirection.RightToLeft;
            //InnerTimePicker.HorizontalContentAlignment = System.Windows.HorizontalAlignment.Right;
            
            //InnerTimePicker.HorizontalAlignment = System.Windows.HorizontalAlignment.Right;
            //InnerTimePicker.UseLayoutRounding = true;
            
            pnl.Children.Add(InnerDatePicker);
            //pnl.Children.Add(spSpliter);
            pnl.Children.Add(InnerTimePicker);
            TimePcikerSetting(false);
            this.Content = pnl;

            EndUpdate();
        }      
Example #2
0
        public DateTimePicker() : base()
        {
            StackPanel pnl = new StackPanel();

            InnerDatePicker = new SmtDatePicker();
            InnerTimePicker = new TimePicker();
            //InnerTimePicker.Width = 50;
            //StackPanel spSpliter = new StackPanel();
            //spSpliter.Width = 5;
            pnl.Orientation = Orientation.Horizontal;

            InnerDatePicker.Style  = Application.Current.Resources["DatePickerStyle"] as Style;
            InnerDatePicker.Margin = new Thickness(0, 0, 5, 0);
            InnerTimePicker.Style  = Application.Current.Resources["TimePickerStyle"] as Style;
            //InnerDatePicker.MaxWidth = 300;
            InnerDatePicker.MinWidth = 110;
            //InnerTimePicker.MinWidth = 270;
            //InnerTimePicker.MaxWidth = 110;
            //InnerTimePicker.FlowDirection = System.Windows.FlowDirection.RightToLeft;
            //InnerTimePicker.HorizontalContentAlignment = System.Windows.HorizontalAlignment.Right;

            //InnerTimePicker.HorizontalAlignment = System.Windows.HorizontalAlignment.Right;
            //InnerTimePicker.UseLayoutRounding = true;

            pnl.Children.Add(InnerDatePicker);
            //pnl.Children.Add(spSpliter);
            pnl.Children.Add(InnerTimePicker);
            TimePcikerSetting(false);
            this.Content = pnl;

            EndUpdate();
        }