I an creating a custom date picker control using the radCalendar. (The radDatetime picker does not allow for some of the calendar options our client has requested).
The user control uses a ToolStripDropDown to display the radCalendar control when the user clicks a button.
My problem is the theme is not applied from the second through xth instance of the user control. The first instance added to a form will always theme correctly.
Below is a snippet of code from the user control showing the creation of the radCalendar, ToolStripControlHost and ToolStripDropdown control.
Suggestions?
Thanks,
Chris
The user control uses a ToolStripDropDown to display the radCalendar control when the user clicks a button.
My problem is the theme is not applied from the second through xth instance of the user control. The first instance added to a form will always theme correctly.
Below is a snippet of code from the user control showing the creation of the radCalendar, ToolStripControlHost and ToolStripDropdown control.
Suggestions?
Thanks,
Chris
| //Create the calendar |
| RadCalendar radCalendar = new RadCalendar(); |
| radCalendar.Orientation = Orientation.Horizontal; |
| radCalendar.DayNameFormat = Telerik.WinControls.UI.DayNameFormat.Full; |
| radCalendar.ShowRowHeaders = false; |
| radCalendar.ShowColumnHeaders = true; |
| radCalendar.AllowMultipleView = true; |
| radCalendar.MultiViewColumns = 2; |
| radCalendar.ThemeName = "Office2007Blue"; |
| radCalendar.Size = new Size(462, 275); |
| radCalendar.SelectionChanged += new EventHandler(radCalendar_SelectionChanged); |
| //Create the Calendar Host |
| _calendarHost = new ToolStripControlHost(radCalendar); |
| _calendarHost.Height = radCalendar.Height; |
| _calendarHost.Width = radCalendar.Width; |
| //Create the drop down |
| _dropDown = new ToolStripDropDown(); |
| _dropDown.Width = radCalendar.Width; |
| _dropDown.Height = radCalendar.HeaderHeight; |
| _dropDown.VisibleChanged += new EventHandler(_dropDown_VisibleChanged); |
| _dropDown.Items.Add(_calendarHost); |