WPF/C#: Enable/Disable buttons depending on the number of clicks

Posted by eibhrum on Stack Overflow See other posts from Stack Overflow or by eibhrum
Published on 2010-03-27T04:13:56Z Indexed on 2010/03/27 4:23 UTC
Read the original article Hit count: 379

Filed under:
|
|
|
|

Hi,

I do have two buttons

'btnPrev' and 'btnNext'

What I want to do is to be able to determine the number of clicks of the button so that I could enable and disable them. The process is almost similar to 'paging' method.

Initial state: btnPrev - disabled, btnNext - enabled 1st Click (btnNext): btnPrev - enabled, btnNext - enabled 2nd Click (btnNext): btnPrev - enabled, btnNext - enabled 3rd Click (btnNext): btnPrev - enabled, btnNext - disabled

the idea is almost the same vice-versa (for btnPrev)

any suggestions how to do it?

© Stack Overflow or respective owner

Related posts about c#

Related posts about wpf