Class added when panel bar clicked

4 posts, 0 answers
  1. Bob
    Bob avatar
    138 posts
    Member since:
    Sep 2012

    Posted 16 Sep 2014 Link to this post

    I am using the panel bar with only a single panel for a portal dashboard so it can be collapsed and expanded. 

    This is working fine:

     @(Html.Kendo().PanelBar()
                    .Name("widget1")
                    .ExpandMode(PanelBarExpandMode.Multiple)
                    .Items(panelBar => {
                            panelBar.Add().Text("Bob1")            
                            .Expanded(true)
                            .Content(@<div>Some Content</div>);
                        })
                )

    However, when I click on the panel bar title to collapse the color changes. I assume some style is being added or removed but I just can't figure out what it is. I am using the blueopal styling, it changes from a light blue to a dark blue.

  2. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2564 posts

    Posted 18 Sep 2014 Link to this post

    Hello Bob,

    The .k-state-selected class is added to the item that was clicked last (for expand or collapse). In your case the dark blue color comes from this class. So if you want to override this just change the class background-color property.

    Regards,
    Kiril Nikolov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. Bob
    Bob avatar
    138 posts
    Member since:
    Sep 2012

    Posted 18 Sep 2014 in reply to Kiril Nikolov Link to this post

    Thanks, like 10 minutes after I posted this, I figured that out. It also seems to add k-state-focused. 

    I don't see anything in the API reference about what styles are added/removed by certain events. It would be nice to have.
  5. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2564 posts

    Posted 19 Sep 2014 Link to this post

    Hi Bob,

    I am glad you found the solution.

    As for the API reference - I will bring this topic to the people responsible for it, so maybe we will see these added in the future.

    Regards,
    Kiril Nikolov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready