Multiple Expander have to collapse if ONE is expanded

前端 未结 7 1015
南笙
南笙 2020-12-08 22:42

Having 4 Expander controls. When one expander is expanded how can I make all others collapse/close?

7条回答
  •  执念已碎
    2020-12-08 23:42

    Use MVVM and bind the IsExpanded property to a boolean flag on your view models. When one is updated to true, set all the others to false.

提交回复
热议问题