本文整理匯總了VB.NET中System.Windows.Controls.InkCanvas.EditingMode屬性的典型用法代碼示例。如果您正苦於以下問題:VB.NET InkCanvas.EditingMode屬性的具體用法?VB.NET InkCanvas.EditingMode怎麽用?VB.NET InkCanvas.EditingMode使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類System.Windows.Controls.InkCanvas
的用法示例。
在下文中一共展示了InkCanvas.EditingMode屬性的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1: Window1
Class Window1
Inherits Window
Private inkEditingMode As RadioButton
Private selectEditingMode As RadioButton
Private eraseByStrokeEditingMode As RadioButton
Private eraseByPointEditingMode As RadioButton
Private inkCanvas1 As InkCanvas
Private stackPanel1 As StackPanel
Private root As DockPanel
Public Sub New()
InitializeComponent()
End Sub
Private Sub WindowLoaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
root = New DockPanel()
Me.Content = root
stackPanel1 = New StackPanel()
root.Children.Add(stackPanel1)
inkEditingMode = New RadioButton()
inkEditingMode.Content = "Ink"
stackPanel1.Children.Add(inkEditingMode)
AddHandler inkEditingMode.Click, AddressOf inkEditingMode_Click
inkEditingMode.IsChecked = True
selectEditingMode = New RadioButton()
selectEditingMode.Content = "Select"
stackPanel1.Children.Add(selectEditingMode)
AddHandler selectEditingMode.Click, AddressOf selectEditingMode_Click
eraseByStrokeEditingMode = New RadioButton()
eraseByStrokeEditingMode.Content = "Erase by Stroke"
stackPanel1.Children.Add(eraseByStrokeEditingMode)
AddHandler eraseByStrokeEditingMode.Click, AddressOf eraseByStrokeEditingMode_Click
eraseByPointEditingMode = New RadioButton()
eraseByPointEditingMode.Content = "Erase by Point"
stackPanel1.Children.Add(eraseByPointEditingMode)
AddHandler eraseByPointEditingMode.Click, AddressOf eraseByPointEditingMode_Click
inkCanvas1 = New InkCanvas()
root.Children.Add(inkCanvas1)
End Sub
Private Sub eraseByPointEditingMode_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
inkCanvas1.EditingMode = InkCanvasEditingMode.EraseByPoint
End Sub
Private Sub eraseByStrokeEditingMode_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
inkCanvas1.EditingMode = InkCanvasEditingMode.EraseByStroke
End Sub
Private Sub selectEditingMode_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
inkCanvas1.EditingMode = InkCanvasEditingMode.Select
End Sub
Private Sub inkEditingMode_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
inkCanvas1.EditingMode = InkCanvasEditingMode.Ink
End Sub
End Class