本文整理匯總了VB.NET中System.Windows.FrameworkElement.Cursor屬性的典型用法代碼示例。如果您正苦於以下問題:VB.NET FrameworkElement.Cursor屬性的具體用法?VB.NET FrameworkElement.Cursor怎麽用?VB.NET FrameworkElement.Cursor使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。
在下文中一共展示了FrameworkElement.Cursor屬性的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1: CursorTypeChanged
' When the Radiobox changes, a new cursor type is set
Private Sub CursorTypeChanged(ByVal sender As Object, ByVal e As SelectionChangedEventArgs)
Dim item As String = CType(e.Source, ComboBox).SelectedItem.Content.ToString()
Select Case item
Case "AppStarting"
DisplayArea.Cursor = Cursors.AppStarting
Case "ArrowCD"
DisplayArea.Cursor = Cursors.ArrowCD
Case "Arrow"
DisplayArea.Cursor = Cursors.Arrow
Case "Cross"
DisplayArea.Cursor = Cursors.Cross
Case "HandCursor"
DisplayArea.Cursor = Cursors.Hand
Case "Help"
DisplayArea.Cursor = Cursors.Help
Case "IBeam"
DisplayArea.Cursor = Cursors.IBeam
Case "No"
DisplayArea.Cursor = Cursors.No
Case "None"
DisplayArea.Cursor = Cursors.None
Case "Pen"
DisplayArea.Cursor = Cursors.Pen
Case "ScrollSE"
DisplayArea.Cursor = Cursors.ScrollSE
Case "ScrollWE"
DisplayArea.Cursor = Cursors.ScrollWE
Case "SizeAll"
DisplayArea.Cursor = Cursors.SizeAll
Case "SizeNESW"
DisplayArea.Cursor = Cursors.SizeNESW
Case "SizeNS"
DisplayArea.Cursor = Cursors.SizeNS
Case "SizeNWSE"
DisplayArea.Cursor = Cursors.SizeNWSE
Case "SizeWE"
DisplayArea.Cursor = Cursors.SizeWE
Case "UpArrow"
DisplayArea.Cursor = Cursors.UpArrow
Case "WaitCursor"
DisplayArea.Cursor = Cursors.Wait
Case "Custom"
DisplayArea.Cursor = CustomCursor
End Select
' if the cursor scope is set to the entire application
' use OverrideCursor to force the cursor for all elements
If (cursorScopeElementOnly = False) Then
Mouse.OverrideCursor = DisplayArea.Cursor
End If
End Sub