zoukankan      html  css  js  c++  java
  • Windows-universal-samples学习笔记系列五:Custom user interactions

    Custom user interactions
    Basic input Complex inking Inking
    Low latency input Simple inking Touch keyboard

     Basic input sample

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

    Specifically, this 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 / exited, 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 are available on the current system.
    • Manipulate a XAML element: Use the ManipulationMode property to register for specific manipulation events on XAML elements and react to them in order to move and rotate the element.
    • Manipulate an object using a GestureRecognizer: Use an instance of a GestureRecognizer to move and rotate an object. This is useful if your app uses its own framework and, thus, cannot use the manipulation events on XAML elements.

    Complex inking sample (仅用于c++)

    Inking sample (仅用于js)

    Low latency input sample (仅用于c++)

    Simple inking sample

    This sample demonstrates how to use ink functionality (such as capturing ink from user input and performing handwriting recognition 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) are 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 the 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 do not display the touch keyboard by default.
    • On the PC, you can request that the touch keyboard display for a custom control by implementing the TextPattern provider interface (ITextProvider) and the ValuePattern provider interface (IValueProvider). Not supported on Phone.
    • You can request that the touch keyboard not display when focus is programmatically placed on a control.
  • 相关阅读:
    socket 断线重连
    openwrt lan/wan口自动翻转
    单总线通讯协议
    关于Feign的Fallback处理
    Linux查找占用的端口,并杀死进程
    springCloud--admin监控使用
    解决执行脚本报syntax error: unexpected end of file或syntax error near unexpected token `fi'错误的问题
    Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
    Shell中[和[[的异同
    Spring Cloud中,如何解决Feign/Ribbon第一次请求失败的问题?
  • 原文地址:https://www.cnblogs.com/qianblue/p/4862529.html
Copyright © 2011-2022 走看看