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.
  • 相关阅读:
    C#学习笔记——释放资源
    C#学习笔记——窗口停靠控件WeifenLuo.WinFormsUI.Docking使用
    C#学习笔记——查询串口被占用
    C#学习笔记——调试
    C#学习笔记——datagridview 控件 配置遇到的问题
    【转载】焊缝跟踪技术的发展与应用现状
    C#学习笔记——Convert.ToDouble与Double.Parse与Double.Parse
    C#学习笔记——Trim()、TrimStart()、TrimEnd()的用法
    C#学习笔记——DataGridView功能总结
    360自带--JS开发工具箱
  • 原文地址:https://www.cnblogs.com/qianblue/p/4862529.html
Copyright © 2011-2022 走看看