Monday, 15 August 2011

wpf - How to prevent a TabItem from being selected & keep focus back on last edited control -



wpf - How to prevent a TabItem from being selected & keep focus back on last edited control -

i trying accomplish functionality stop user selecting new tab when current tab has pending changes. below reference, able show message & stop user selecting new tab facing problem set focus on lastly focused command in tab item. please help.

http://joshsmithonwpf.wordpress.com/2009/09/04/how-to-prevent-a-tabitem-from-being-selected/

can utilize async await command method in viewmodel has istabenabled boolean property bound tabitem set true 1 time work completed?

private async void processdatacommandaction() { //business logic await task; istabenabled = true; }

xaml:

<tabitem header="tabitem1" isenabled="{binding istabenabled, updatesourcetrigger=onpropertychanged"}>

wpf wpf-controls

No comments:

Post a Comment