简体   繁体   中英

Disable up state if clicking Down button in ButtonBar

I am having ButtonBar to navigate through NavigationContent inside ViewStack.

It all works fine as expected but once we click a selected button second time. In this case the Button state changes to up state and it shows as if no button is selected right now.

I tried to address this issue by modifying ButtonBarButtonSkin for First, middle and last buttons by doing following: Set color for upandselected state to red (the color i set for selected state):

color.upAndSelected="0xFF0000"

But it did not help me.

How can I:

Either set the color for button that is up and selected?

Or Not allow ButtonBar to make state up in case the button being pressed is already in down State... ie... allowing clicking for only up state buttons.

Just solved the problem by setting parameter requireSelection as true:

requireSelection="true"

PS: Leaving the question alive to help the other nubes like me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM