我想顯示沙漏光標,並禁用BackgroundWorker進程在另一個線程中運行時的窗口。WPF等待光標與BackgroundWorker線程
這是我在做什麼:
Private Sub MyButton_Click(...)
Dim box As New AnotherWpfWindow()
box.Owner = Me
...
box.ShowDialog()
If (box.DialogResult.GetValueOrDefault = True) Then
Me.IsEnabled = False
Me.Cursor = Cursors.Wait
MyBackgroundWorker.RunWorkerAsync()
End If
End Sub
Private Sub MyBackgroundWorker_RunWorkerCompleted(...)
UpdateInterface()
Me.IsEnabled = True
Me.Cursor = Cursors.Arrow
End Sub
的窗口變得禁用像我想要的,但光標保持一個箭頭。我怎樣才能讓它等待光標?
它似乎根據這個問題的vg1890工作:Disabling all but one control in a WPF window
這樣做。謝謝。 – 2009-04-21 12:55:31