CSSClass seems to be ignored

3 posts, 0 answers
  1. Garry
    Garry avatar
    205 posts
    Member since:
    Nov 2010

    Posted 11 Oct 2007 Link to this post

    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. Garry
    Garry avatar
    205 posts
    Member since:
    Nov 2010

    Posted 11 Oct 2007 Link to this post

    Also along these same lines is there no way to define a CSSClass for a Dock ContentTemplate or a TitleBarTemplate? Thanks again!
  3. Petya
    Admin
    Petya avatar
    869 posts

    Posted 12 Oct 2007 Link to this post

    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
Back to Top