For operations that take a long time, you’ll want to notifiy users that something is happening, and perhaps prevent them from interacting with the application during that time. One method is to make a semi-opaque rectangle covering the whole control, with a loading message of some kind. But I wanted to just disable the controls and change the cursor to the Wait cursor. I tried setting IsEnabled=false and Cursor=”Wait” on my User Control, to no avail. It looks like you cannot change the cursor on disabled controls; it will just remain the Arrow cursor. And you can only set IsEnabled on controls, not containers such as Grids, which contain numerous controls. My solution was to wrap the grid in a Content Control and set IsEnabled=false there. Then set the cursor property to the parent User Control (the opposite wouldn’t work, since the Disabled would propagate down). This way you’ll need to set two different properties, but you won’t have an extra rectangle or canvas in your page.
Comments are closed.