开发者

Silverlight Accordion control: all collapsed when loaded

I'm currently working on a project where I have an Accordion control on the MainPage. It all works just as intended, but there's a small problem that I cannot seem to get my head around.

When I load the page, the first accordion is expanded. Is there any work-around to tell the Acco开发者_高级运维rdion control, that all the accordions should be collapsed when first loaded?

Also, I can click to expand the items, but when I click on the same item that I just expanded, it won't collapse again. Anyone know which event I should reach for here?

Thanks in advance.

All the best,

Bo


You need to change the SelectionMode property to ZeroOrOne the default is One which means it will insist on having at least one item open.

Set the SelectedIndex property to -1 to hide all items.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜