RE: Theming custom created WebParts in ASP.NET 2.0
- From: "Christopher Kimbell" <c_kimbell@xxxxxxxxxxxxxxxx>
- Date: Tue, 28 Jun 2005 06:37:11 -0700
I get your point about using simple strings. One thing though, say you expose
a color, this can be specified using a name like 'Red' or it may be specified
using hex notation, like '#FFCC66'. The controls require a Color object, how
does one map between the different representations and the Color object. Are
there any utility classes I can use?
I have now done a bit more experimenting. If I declaratively add the webpart
to a webpartzone, then the theme is correctly applied. If I add the same
webpart to the zone using a catalog, the style is not applied. The catalog
I'm adding from is a custom created one, not one of the predefined types.
Any suggestions?
"Steven Cheng[MSFT]" wrote:
> Hi c_kimbell,
>
> Thanks for your followup.
> As you mentioned that
> =================
>
>
> 1. On the webpart I have exposed the Calendar as a property with the name
> FromCalendar.
> 2. I have added the following to the .skin file
>
> <%@ Register Assembly="IMK.WebParts" Namespace="IMK.WebParts"
> TagPrefix="IMK" %>
>
> <IMK:IMKDateWebPart runat="server">
> <FromCalendar BackColor="#FFFFCC">
> <SelectedDayStyle BackColor="#CCCCFF" Font-Bold="True" />
> <TitleStyle BackColor="#990000" Font-Bold="True" Font-Size="9pt"
> ForeColor="#FFFFCC" />
> </FromCalendar>
> </IMK:IMKDateWebPart>
> =======================
>
> I'm not sure whether this will cause error since I haven't tested it.
> However, IMO, I'd prefer expose a single string property on my custom web
> control which represent the nested child calendar's Theme(or
> stylesheettheme). Since the ASP.NET 2.0 's Theme are mostly for those
> simple type properteis (such as string, int), I think just exposing a
> single string type property will be much better). You can do the actual
> Theme adjusting in the Property's Setter method.
> How do you think ?
>
> Steven Cheng
> Microsoft Online Support
>
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>
>
.
- Follow-Ups:
- RE: Theming custom created WebParts in ASP.NET 2.0
- From: Steven Cheng[MSFT]
- RE: Theming custom created WebParts in ASP.NET 2.0
- References:
- Theming custom created WebParts in ASP.NET 2.0
- From: Christopher Kimbell
- RE: Theming custom created WebParts in ASP.NET 2.0
- From: Steven Cheng[MSFT]
- RE: Theming custom created WebParts in ASP.NET 2.0
- From: Christopher Kimbell
- RE: Theming custom created WebParts in ASP.NET 2.0
- From: Steven Cheng[MSFT]
- Theming custom created WebParts in ASP.NET 2.0
- Prev by Date: Re: VB.NET "Text" to SQL "Text"?
- Next by Date: Re: Increase Image Quality of Charts (CR.NET)
- Previous by thread: RE: Theming custom created WebParts in ASP.NET 2.0
- Next by thread: RE: Theming custom created WebParts in ASP.NET 2.0
- Index(es):
Relevant Pages
|