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

Class added when panel bar clicked

3 Answers 122 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Bob
Top achievements
Rank 1
Bob asked on 16 Sep 2014, 08:41 PM
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.

3 Answers, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 18 Sep 2014, 08:43 AM
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!
 
0
Bob
Top achievements
Rank 1
answered on 18 Sep 2014, 03:23 PM
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.
0
Kiril Nikolov
Telerik team
answered on 19 Sep 2014, 10:23 AM
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!
 
Tags
PanelBar
Asked by
Bob
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Bob
Top achievements
Rank 1
Share this question
or