Windows-universal-samples Study Note series five: Custom user interactions

Source: Internet
Author: User

Custom User Interactions
Basic input Complex inking Inking
Low latency input Simple inking Touch keyboard

Basic Input Sample

This is the sample shows how to handle input in Universal Windows Apps.

Specifically, this is sample shows how to:

  • Listen for events on XAML elements: Use events on XAML elements to listen for various types of input, such as pointer pressed/released, pointer enter/exit Ed, Tap/double-tap, and Right-tap/press-and-hold.
  • Retrieve Properties about a pointer object: Use a Pointerpoint object to retrieve information common to all pointers (such as x/y coordinates) as well as information Specific to the type of input being used (such as mouse wheel information).
  • Query input capabilities for the system: Use the Keyboardcapabilities, Mousecapabilities, and touchcapabilities classes to determine what types of input is Availa BLE on the current system.
  • Manipulate a XAML element: Use the Manipulationmode-register for specific manipulation events on XAML elements and react-them in order To move and rotate the element.
  • Manipulate An object using a Gesturerecognizer: Use the instance of a gesturerecognizer to move and rotate an object. This was useful if your app uses its own framework and, thus, cannot use the manipulation events on XAML elements.

Complex Inking Sample (for C + + only)

inking sample (JS only)

Low latency Input Sample (for C + + only)

Simple Inking sample

This sample demonstrates how to use ink functionality (such as capturing ink from user input and performing handwriting re Cognition on Ink strokes) in Universal Windows apps using C #.

Specifically, this sample covers using the Windows.UI.Input.Inking APIs to do the following:

    • Capture user input and render as ink strokes
    • Save and load ink strokes
    • Erase ink Strokes
    • Change which input types (mouse/touch/pen) is used for inking
    • recognize handwriting from ink strokes
    • Select ink Strokes

Touch Keyboard Sample

This sample demonstrates how apps can influence whether the touch keyboard displays when the user taps on a control with T He pen or touch.

    • Standard XAML text controls (such as TextBox, RichTextBox, and Paswordbox) display the touch keyboard by default.
    • Controls derived from standard XAML text controls display the touch keyboard by default.
    • Other controls don't display the touch keyboard by default.
    • On the PC, you can request this touch keyboard display for a custom control by implementing the TextPattern provider I Nterface (Itextprovider) and the ValuePattern Provider interface (Ivalueprovider). Not supported on Phone.
    • You can request this touch keyboard not to display when focus is programmatically placed on a control.

Windows-universal-samples Learning Note Series five: Custom user interactions

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.