internal CalendarNavigationElement(RadCalendarElement owner)
     : base(owner)
 {
     this.Calendar.PropertyChanged += new PropertyChangedEventHandler(Calendar_PropertyChanged);
     this.dropDown.OwnerControl     = this.Calendar;
     this.SetText();
 }
Пример #2
0
        protected override void OnThemeChanged()
        {
            base.OnThemeChanged();
            RadDateTimePickerCalendar currentBehavior = this.dateTimePickerElement.GetCurrentBehavior() as RadDateTimePickerCalendar;

            if (currentBehavior == null)
            {
                return;
            }
            currentBehavior.Calendar.ThemeName     = this.ThemeName;
            currentBehavior.PopupControl.ThemeName = this.ThemeName;
            if (currentBehavior.ShowTimePicker && currentBehavior.TimePicker != null)
            {
                currentBehavior.TimePicker.ThemeName = this.ThemeName;
                if (currentBehavior.ShowFooter)
                {
                    currentBehavior.FooterPanel.ThemeName = this.ThemeName;
                }
            }
            if (!TelerikHelper.IsMaterialTheme(this.ThemeName))
            {
                return;
            }
            Size size = TelerikDpiHelper.ScaleSize(new Size(300, 390), this.RootElement.DpiScaleFactor);

            if (this.dateTimePickerElement.ShowTimePicker)
            {
                currentBehavior.Calendar.MinimumSize = TelerikDpiHelper.ScaleSize(new Size(300, 0), this.RootElement.DpiScaleFactor);
                size.Width = 590;
            }
            currentBehavior.DropDownMinSize = size;
            RadCalendarElement calendarElement = currentBehavior.Calendar.CalendarElement;

            calendarElement.DrawBorder          = true;
            calendarElement.BorderBoxStyle      = BorderBoxStyle.FourBorders;
            calendarElement.BorderGradientStyle = GradientStyles.Solid;
            calendarElement.BorderBottomColor   = calendarElement.BorderBottomShadowColor = calendarElement.BorderRightColor = calendarElement.BorderRightShadowColor = calendarElement.BorderLeftShadowColor = calendarElement.BorderTopShadowColor = Color.Transparent;
            calendarElement.BorderLeftColor     = calendarElement.BorderTopColor = Color.FromArgb(236, 236, 236);
        }
Пример #3
0
 internal CalendarStatusElement(RadCalendarElement owner)
     : base(owner)
 {
     this.owner = owner;
     this.owner.Calendar.PropertyChanged += new PropertyChangedEventHandler(Calendar_PropertyChanged);
 }