Tim Jarvis
2/11/2009 11:57:00 AM
I know this is an old post but I had the same problem and found a soltuion
You need to add an attribute to the end of the declaration of the CSS
resource.
[assembly: WebResource("Resources.CSS.stylesheet.css", "text/css",
PerformSubstitution = true)]
"samuel.m.smith@gmail.com" wrote:
> On Aug 6, 8:18 pm, waw...@online.microsoft.com ("Walter Wang [MSFT]")
> wrote:
> > Hi Chuck,
> >
> > Thanks for sharing your solution here. I think it's better than having to
> > write a custom control designer.
> >
> > Regards,
> > Walter Wang (waw...@online.microsoft.com, remove 'online.')
> > Microsoft Online Community Support
> >
> > ==================================================
> > When responding to posts, please "Reply to Group" via your newsreader so
> > that others may learn and benefit from your issue.
> > ==================================================
> >
> > This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
> I also overcame the problem you guys are describing by including a
> link tag for the designer in the RenderContent method. However, I
> still have a problem where my background images in the css aren't
> appearing (even though the other styles are working). I'm starting to
> think that the server tags in it aren't working even though I have the
> meta tag PerformSubstitution = true. The control renders Great in the
> browser but crappy in the designer. An example of my css is
>
> ..tabpanel .bar .tab .center_area
> {
> background-image: url('<%=
> WebResource("SMS.TabPanelControl.skins.vista.normal_centerArea.gif")
> %>');
> background-repeat: repeat-x;
> padding: 0px 6px;
> width: auto;
> white-space: nowrap;
> border: 1px solid #898C95;
> }
>
> I'm not quite sure what might be causing the problem. I'm adding the
> style sheet right now in the RenderControl method where I have a
> statement like
>
> if (DesignMode)
> {
> writer.Write("<link href=\"" + GetSkinUrl() +
> "\" rel=\"stylesheet\" type=\"text/css\" />");
> }
>
>
> I can see several of the styles applied in the designer but not any of
> the background images. Just to see if the images would load at all I
> appended one of the background images in the RenderContent method for
> the designer and it appeared. This is the same background-image that
> doesn't appear from the css. I then changed the style attributes of a
> div I am using and manually set the background-image there and it
> appeared. So, I don't get it. The background-images all appear and
> work great in the browser but it looks like crap (since the background-
> images don't appear) in vs2005 designer. Anybody have any ideas? I
> somehow wonder if the tags that should be interpreted in the css
> aren't being interpreted in the designer even though I have a meta tag
> with the PerformSubstitution = true for interpreting it.
>
> Any ideas would be much appreciated. I've searched many forums about
> the issue and haven't seen anyone write a solution.
>
>