当前位置: 首页>>代码示例>>C#>>正文


C# InkPresenter类代码示例

本文整理汇总了C#中System.Windows.Controls.InkPresenter的典型用法代码示例。如果您正苦于以下问题:C# InkPresenter类的具体用法?C# InkPresenter怎么用?C# InkPresenter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


InkPresenter类属于System.Windows.Controls命名空间,在下文中一共展示了InkPresenter类的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);
    }
}
开发者ID:.NET开发者,项目名称:System.Windows.Controls,代码行数:63,代码来源:InkPresenter


注:本文中的System.Windows.Controls.InkPresenter类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。