search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Using Themes

Asked by Redd
16 years ago.

I'm trying to apply theme skins to the various controls. The DayPilotCalendar works great. However, for DayPilotBubble and DayPilotMenu, I have not had any luck. I keep getting the YSOD with the error: the control cannot be themed.

Here is what I have in the skin file:

<%@ Register Assembly="DayPilot" Namespace="DayPilot.Web.Ui" TagPrefix="DayPilot" %>

<%-- DayPilot Bubble Control --%> <DayPilot:DayPilotBubble runat="server" BackColor="#ccff99" BorderColor="#006699" UseShadow="true">
</DayPilot:DayPilotBubble>

<%-- DayPilot Menu Control --%> <DayPilot:DayPilotMenu runat="server" MenuTitle="Actions" MenuBackColor="#ffffcc" MenuBorderColor="#336699"
MenuItemColor="#336699" MenuTitleBackColor="#669999" MenuFontSize="8pt">
</DayPilot:DayPilotMenu>

Any ideas? Thanks in advance!

Comment posted by Redd
16 years ago.

I realized why this happenned. It's because the color properties on the above two controls take System.Color values instead of the Html values. At least, that was my conclusion.

So, in my codebehind, I can set these color values using the Html values as such:

DayPilotBubble1.BackColor = ColorTranslator.FromHtml("#ccff99");

While this is not entirely skinnable, I can still put the colors in a config file and accomplish the same feat.

Comment posted by Dan Letecky
16 years ago.
Hi Redd, Thanks for the follow up.

I checked the issue and the problem seems to be the missing [Themeable(true)] attribute. All other controls are derived from WebControl (which has Themeable attribute set) but DayPilotBubble and DayPilotMenu are derived directly from Control.

I've fixed it in the code so the fix will be included in the next release.
This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.