GithubHelp home page GithubHelp logo

newlifes01 / windows-appsample-coloringbook Goto Github PK

View Code? Open in Web Editor NEW

This project forked from microsoft/windows-appsample-coloringbook

0.0 3.0 0.0 25.33 MB

Sample app demonstrating Ink, printing, and in-app purchases for the Universal Windows Platform.

C# 100.00%

windows-appsample-coloringbook's Introduction

Coloring Book UWP app sample

A mini-app that explores Windows Ink and Monetization features using the Windows Store. Specifically, it allows users to purchase coloring page collections and then color with Windows Ink. This sample runs on the Universal Windows Platform (UWP).

Using Ink in your UWP app video

Features

Coloring Book demonstrates:

  • Using the Windows.Services.Store API for managing in-app purchases
  • Customizing Windows Ink experiences with custom tools and pages
  • Saving Windows Ink onto an image
  • Manipulating Windows Ink with other files to save, open, export, share, and print

UWP development

This sample requires Visual Studio 2015 and the Windows Software Development Kit (SDK) for Windows 10 Anniversary. Get a free copy of Visual Studio 2015 Community Edition with support for building UWP apps. Additionally, to be informed of the latest updates to Windows and the development tools, join the Windows Insider Program.

Running the sample

The default project is ColoringBook, and you can Start Debugging (F5) or Start Without Debugging (Ctrl+F5) to try it out. The app will run in the emulator or on physical devices.

To enable the in-app purchases code:

  1. Follow the instructions to test in-app purchases to get a Package.StoreAssociation.
  2. Add storeIds in Constants.cs
  3. #define STOREASSOCIATION in PickColoringPage.cs

Adding in-app purchases to your UWP app video

Code at a glance

If you’re just interested in code snippets for certain API and don’t want to browse or run the full sample, check out the following files for examples of some highlighted features:

In-app purchases:

  • PickColoringPage.xaml.cs verifies if the coloring page collection has been purchased, and if not, allows the user to purchase the collection.
  • Constants.cs maintains a dictionary of the storeIds associated the coloring page collections.

Windows Ink:

Printing:

  • PrintSample is slightly modified from the Windows Printing Sample – ColoringPage sends PhotoPrintHelper a stream to print.

See also

Monetize documentation
Pen and stylus documentation

windows-appsample-coloringbook's People

Contributors

karlerickson avatar joshuapartlow avatar

Watchers

James Cloos avatar  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.