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