Git Product home page Git Product logo

myscript.interactiveink.starter.uwp's Introduction

MyScript Interactive Ink SDK | Starter | UWP

This project demonstrates a simple way to integrate MyScript Interactive Ink SDK into your UWP app.

  1. Project Structure
  2. Class/Type Structure
  3. Several You-Must-Knows
  4. Disclaimer

Project Structure

alt

This project consists of 3 groups:

  • The application project Starter;
  • The shared libraries Modules, including:
    • Library Common;
    • Library UI;
  • The shared sources, including:
    • The shared recognition resources Resources;
    • The shared localization Strings;
    • The shared Certificate from MyScript Developer, which is required to integrate Interactive Ink SDK.

To obtain your own developer certificate, please follow the official instructions.

Class/Type Structure

alt

Corresponding to the project structure, classes/types are grouped into the following namespaces:

  • Starter -> MyScript.InteractiveInk.*;
  • Common -> MyScript.InteractiveInk.Common.*;
  • UI -> MyScript.InteractiveInk.UI.*

The entry point is App, which creates and holds a Engine instance with MyCertificate. Then the App launches MainPage, which creates and holds a corresponding MainViewModel to hold an Editor instance. The Editor is supposed to be attached to the UI control InteractiveInkCanvas, which handles the most of rendering commands and exposes interactivity from Interactive Ink SDK to the application layer.

The main implementation lies in InteractiveInkCanvas, to apply this controls in application, you have to:

First, create an Editor (see MainViewModel):

// Code behind.
public Editor Editor { get; set; }
// Assumes that the DPI is the default value 96.
var dpi = 96;
var renderer = engine.CreateRenderer(dpi, dpi, RenderTarget);
Editor = engine.CreateEditor(renderer);

Then attach the Editor to InteractiveInkCanvas (see MainPage):

<!-- Xaml -->
<Page xmlns:iink="using:MyScript.InteractiveInk.UI.Xaml.Controls">
    <iink:InteractiveInkCanvas
        x:Name="RenderTarget"
        Editor="{x:Bind Editor, Mode=OneWay}" />
</Page>

Several You-Must-Knows

Basically, Interactive Ink SDK follows the most common inking mechanism: input the user pointer events into the Editor, then the Editor outputs the rendering commands, which are supposed to be implemented by developers on their platforms. Therefore, the following are the points that you have to implement to integrate Interactive Ink SDK into your app:

See more information about MyScript Interactive Ink SDK.

Disclaimer

This project is only a representative of personal views, instead of any official positions!

myscript.interactiveink.starter.uwp's People

Contributors

jingkecn avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.