This is a migrated thread and some comments may be shown as answers.

[Solved] CSSClass seems to be ignored

2 Answers 177 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Garry
Top achievements
Rank 1
Garry asked on 11 Oct 2007, 07:32 PM

Can you not set the border style and backcolor of a DockZone via the CSSClass property? For example if I define a dockzone as such 

<telerik:RadDockZone ID="dockZoneLeft" runat="server" Width="99%" MinHeight="400px" HighlightedCssClass="dockZoneLeftColumnHighlight" Orientation="Vertical" BackColor="transparent" BorderStyle="None">

it displays as I want but if I define it like this 

<telerik:RadDockZone ID="dockZoneLeft" runat="server" Width="99%" MinHeight="400px" CssClass="dockZoneLeftColumn" HighlightedCssClass="dockZoneLeftColumnHighlight" Orientation="Vertical">

it does not seem to read the css. Also HighlightedCssClass does not work in either instance.

Here are my css classes for each.

.dockZoneLeftColumn
{
background-color: transparent;
border: 'none 0px transparent';
}
.dockZoneLefttColumnHighlight
{
background-color:Yellow;
border:dashed 1px black;
}

Thanks!

2 Answers, 1 is accepted

Sort by
0
Garry
Top achievements
Rank 1
answered on 11 Oct 2007, 07:34 PM
Also along these same lines is there no way to define a CSSClass for a Dock ContentTemplate or a TitleBarTemplate? Thanks again!
0
Petya
Telerik team
answered on 12 Oct 2007, 11:49 AM
Hello Garry Clark,

The problem with the HighlightedCssClass property happens because even though you apply your own styles to the highlighted zone, they are overriden by those specified in the Skin. To avoid this use !important:

 .dockZoneLefttColumnHighlight
        {
            background-color:Yellow !important;
            border:dashed 1px black !important;
        }

As far as applying a CssClass to the zone, the dock's content template and titlebar, our suggestion is to create a custom skin as specified in this help article. Only for the zone you could use the CssClass property but you need to be aware that the styles defined with the
CssClass property will be added to those coming from the zone's skin css class with priority given to those from the skin. To avoid this use again !important as with the HighlightedCssClass  property. Another way would be to apply directly the Style property to the zone and it will have the highest priority. In general you could use Style and CssClass for some small polishing on the zones, but for more complicated appearance we strongly suggest creating a custom skin or modifying an existing one.

All the best,
Petya
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Dock
Asked by
Garry
Top achievements
Rank 1
Answers by
Garry
Top achievements
Rank 1
Petya
Telerik team
Share this question
or