本文整理汇总了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