WPF Enable/Disabled controls from a page placed inside main window application

Posted by toni on Stack Overflow See other posts from Stack Overflow or by toni
Published on 2010-03-23T11:49:35Z Indexed on 2010/03/23 11:53 UTC
Read the original article Hit count: 455

Filed under:
|
|
|
|

Hi! I have an WPF application that has a main window. In the left side of this Window there are some buttons into a listbox, it is a kind of menu to access faster to pages. These buttons belongs to pages that they are loaded inside the window when the user selects one.

Main window also has another main menu in the top for doing other tasks.

When a page is loaded in the main window and the user clicks a button of this currently loaded page, it starts a task that takes a long time. While this long task is executing I want the user can not select (or press) any of the buttons into the listbox because In the loaded page the long task also is updating the UI for this page. I would like to disabled (isEnabled=false) the listbox when long task is executing and not to enabled it until the long task has finished. How can I do this? I mean, from the page is currently loaded I want to disabled the listbox placed in the main window that is the owner.

The listbox doesn't belong to the currently loaded page.

Thanks!

© Stack Overflow or respective owner

Related posts about wpf

Related posts about window