本文整理汇总了C#中System.Windows.Controls.InkPresenter.Strokes属性的典型用法代码示例。如果您正苦于以下问题:C# InkPresenter.Strokes属性的具体用法?C# InkPresenter.Strokes怎么用?C# InkPresenter.Strokes使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类System.Windows.Controls.InkPresenter
的用法示例。
在下文中一共展示了InkPresenter.Strokes属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Window1
public partial class Window1 : Window
{
InkPresenter inkPresenter1;
public Window1()
{
InitializeComponent();
}
private void WindowLoaded(object sender, RoutedEventArgs e)
{
inkPresenter1 = new InkPresenter();
this.Content = inkPresenter1;
StylusPoint segment1Start = new StylusPoint(200, 110);
StylusPoint segment1End = new StylusPoint(185, 150);
StylusPoint segment2Start = new StylusPoint(185, 150);
StylusPoint segment2End = new StylusPoint(135, 150);
StylusPoint segment3Start = new StylusPoint(135, 150);
StylusPoint segment3End = new StylusPoint(175, 180);
StylusPoint segment4Start = new StylusPoint(175, 180);
StylusPoint segment4End = new StylusPoint(160, 220);
StylusPoint segment5Start = new StylusPoint(160, 220);
StylusPoint segment5End = new StylusPoint(200, 195);
StylusPoint segment6Start = new StylusPoint(200, 195);
StylusPoint segment6End = new StylusPoint(240, 220);
StylusPoint segment7Start = new StylusPoint(240, 220);
StylusPoint segment7End = new StylusPoint(225, 180);
StylusPoint segment8Start = new StylusPoint(225, 180);
StylusPoint segment8End = new StylusPoint(265, 150);
StylusPoint segment9Start = new StylusPoint(265, 150);
StylusPoint segment9End = new StylusPoint(215, 150);
StylusPoint segment10Start = new StylusPoint(215, 150);
StylusPoint segment10End = new StylusPoint(200, 110);
StylusPointCollection strokePoints = new StylusPointCollection();
strokePoints.Add(segment1Start);
strokePoints.Add(segment1End);
strokePoints.Add(segment2Start);
strokePoints.Add(segment2End);
strokePoints.Add(segment3Start);
strokePoints.Add(segment3End);
strokePoints.Add(segment4Start);
strokePoints.Add(segment4End);
strokePoints.Add(segment5Start);
strokePoints.Add(segment5End);
strokePoints.Add(segment6Start);
strokePoints.Add(segment6End);
strokePoints.Add(segment7Start);
strokePoints.Add(segment7End);
strokePoints.Add(segment8Start);
strokePoints.Add(segment8End);
strokePoints.Add(segment9Start);
strokePoints.Add(segment9End);
strokePoints.Add(segment10Start);
strokePoints.Add(segment10End);
Stroke newStroke = new Stroke(strokePoints);
inkPresenter1.Strokes.Add(newStroke);
}
}