index > Windows Presentation Foundation ("Avalon") > Disable page input during asynchronous process

Disable page input during asynchronous process

This is the scenario: user clicks on a button; the button handler starts an asynchronous process and changes the page cursor to an hourglass; after the async process finishes, a callback function changes the cursor back to default.

The problem I see is that changing the page cursor does not propagate to some controls which are still displaying the default cursor. Also, I don't know how to stop user's input while my async process is still running (short of disabling all the controls).

The only solution I can think of is to show a modal dialog with a progress bar, but that's not what I want.

So, these are my questions:
1. How can I change the cursor on the page and all the controls contained in it?
2. How can I disable user's input on a page?

Ostrowski
I found the answer to my first question. It is:

Mouse.OverrideCursor = Cursors.Wait;

Ostrowski

I also found the answer to my second question. It is:

Application.Current.Windows[0].IsEnabled = false;

Ostrowski
reply 3

You can use google to search for other answers

 

More Articles

• checkbox capture
• Bug in CollectionView
• Click Event happening twice
• ClickOnce Deployment
• Suggestion: Can TextSearch be improved to support to search strin...
• Item Selection Area
• Dockable windows tool for WPF
• Event and attached method
• Skinning a ScrollViewer (How do I create a custom ControlTemplate...
• DocumentViewer Style
Bookmark and Share
Welcome to Bokebb   New Update  
 

New Articles

• PasswordBox Databind or TextBox mask
• DesiredSize of Control is not set, even
• Does TemplatedParent property return inc
• Disable repaint
• Browser Control editable mode required
• Localization
• Data Binding: Can't set Content property
• How can I select all content of a textbo
• TiffBitmapEncoder issue
• ObjectDataProvider and ConstructorParame
• debug.assert didn't work in debug mode.
• IsItemsHost triggerable?
• Help me snap to device pixels...
• Cannot re-initialize ResourceDictionary
• Difficulty installing .NET 3.0 on Window

Hot Articles

• Using Styles in WPF
• DataBinding:ComboBox doesn't refresh on
• Binding to a non string - possible?
• I want trap attached property change not
• pie chart
• forms authentication with wba
• Property trigger ExitActions
• DropDown Menu Buttons
• How to get data from GridView
• BindingContext in WPF
• Question on the Media Center Animation
• about WindowsFormsHost
• Canvas.Get...Whatever
• How to bind a Canvas's TranslateTransfor
• How to exit a WPF application

Recommend Articles

• Can I simply cycling ScrollViewer?
• XmlDataProvider - Recommend when using l
• Not able to reference to custom control
• MenuItem and KeyBinding question
• Creating a Hyperlink with Databound text
• Dwm thumbnails / Milcore / WPF
• How do you change SelectedItem in a List
• how to create Hyperlink inside textblock
• TemplateBinding bug?
• Binding the TabItem Content
• Could i generate web pages using XAML
• ContextMenu for GridViewColumn
• What's equivalent in WPF for "Appli
• I am not able to install Orcas Technolog
• Capturing events and dynamically created