ASP.NET 2.0 Themes are not WYSIWYG

M

Michael

Hello,

I'm starting to use Themes. I skin some Web controls, like a WebPart and a
CatalogPart. While browsing my Web page, I can see that the Theme is
working, in VS 2005, in design view, I don't see the Theme styles being
applied. Neither are the properties reflected in the Properties window.

Am I doing something wrong? Should the skin properties be reflected in the
Properties Window and in the Design view. I do hope so, because otherwise I
see this as a big problem. Probably making Themes useless for me.

Thanks.
Michael
 
R

RCS

I don't know of any way to make that work - it always displays controls
however they are on a page, without applying a specific theme.

Themes are really for client-side presentation - how could not-seeing the
corrent fonts/colors make this concept useless to you, I wonder?
 
J

Jon Paal

Sounds like you are doing this incorrectly.
The control formatting properties are defined in the skin file.


The content pages, holding the controls for display, reference the "skinid" for formatting.
In the properties for the design view, you should specify the skinid to be applied.
 
M

Michael

Hi Jon,

I'm not specifying the SkinID because I'm pulling from the default skin.

Thanks,
Michael
 
M

Michael

Hi RCS,

Here is an example.

I have a skin file where I define WebPartZone's WebPartVerbRenderMode to
"TitleBar", like:
<asp:WebPartZone runat="server" WebPartVerbRenderMode="TitleBar">

In my Web page where I'm using a WebPartZone, in the properties window, the
WebPartVerbRenderMode is "Menu". Clearly this is wrong. VS2005 designer mode
should be reading from the appropriate Skin file and change the properties
in the properties window accordingly. If it does not render correctly, maybe
I can live with that; but showing the wrong perperty values in the
properties window is not acceptable.

As I said, maybe I'm doing something wrong. Or maybe this is a bug with some
controls, like WebPartZone. Maybe simpler controls implement this correctly;
I haven't tried yet.

Thanks,
Michael
 
T

tdavisjr

in your web.config file the <pages> element have an attribute called
styleSheetTheme. Defind you default theme there and you will get your
theme to show up in designer.

e.g.

<pages styleSheetTheme="BlueTheme" />
 
R

RCS

I wasn't thinking in terms of using the SkinID - I only uses themes in the
web.config where you do <pages Theme="LightBlue" /> or something like that..

And in that particular case, I don't ever see the designer load the
appropriate theme...
 
T

tdavisjr

Well, if the page has a default theme and the control has a skinID,
then it should render in design mode. This happens for me as I was
working on a project with themes earlier today. So, I don't have a
clue why its not rendering for you.
 
M

Michael

Thanks!

I had <pages theme="LightBlue"> in my Web.config. Now I changed it to <pages
theme="LightBlue" styleSheetTheme="LightBlue">. I can now see the styles
being applied in VS Design view. My properties are still showing the wrong
values though.

Do you know what is the difference between "theme" and "styleSheetTheme"? I
read the help file, but I'm still unclear about the difference, if any. The
help file seems to say that both are the same.

Thanks again.
Michael
 
J

Jon Paal

the default skin is where the skinid's are defined.
You have to create this file or get one from another website.

The "default" is not automatic from anywhere, it must be created or brought in.



Michael said:
Hi Jon,

I'm not specifying the SkinID because I'm pulling from the default skin.

Thanks,
Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,170
Latest member
Andrew1609
Top