public object Clone() { var obj = new MonthCalanderAppearance { ActiveTextColor = activeTextColor, ArrowColor = arrowColor, ArrowHoverColor = arrowHoverColor, CaptionTextColor = captionTextColor, ControlBackColor = controlBackColor, ControlBorderColor = controlBorderColor, DateDaySaperatorColor = dateDaySaperatorColor, DayMarker = dayMarker, DisabledMask = disabledMask, FocusedBorder = focusedBorder, HoverColor = hoverColor, InactiveTextColor = inactiveTextColor, Radius = radius, TodayBorderColor = selectedDateBorderColor, SelectedDateTextColor = selectedDateColor, TodayColor = todayColor }; SelectedDateAppearance.Assign((BorderAppearance)selectedDateAppearance.Clone()); ButtonBackColor.Assign((ColorPair)buttonBackColor.Clone()); CaptionBackColor.Assign((ColorPair)captionBackColor.Clone()); SelectedBackColor.Assign((ColorPair)selectedBackColor.Clone()); return(obj); }
public void Assign(MonthCalanderAppearance appearance) { ActiveTextColor = appearance.activeTextColor; ArrowColor = appearance.arrowColor; ArrowHoverColor = appearance.arrowHoverColor; ButtonBackColor.Assign(appearance.buttonBackColor); CaptionBackColor.Assign(appearance.captionBackColor); CaptionTextColor = appearance.captionTextColor; ControlBackColor = appearance.controlBackColor; ControlBorderColor = appearance.controlBorderColor; DateDaySaperatorColor = appearance.dateDaySaperatorColor; DayMarker = appearance.dayMarker; DisabledMask = appearance.disabledMask; FocusedBorder = appearance.focusedBorder; HoverColor = appearance.hoverColor; InactiveTextColor = appearance.inactiveTextColor; Radius = appearance.radius; SelectedBackColor.Assign(appearance.selectedBackColor); SelectedDateAppearance.Assign((BorderAppearance)appearance.selectedDateAppearance.Clone()); TodayBorderColor = appearance.selectedDateBorderColor; SelectedDateTextColor = appearance.selectedDateColor; TodayColor = appearance.todayColor; }