[源码下载]

重新想象 Windows 8 Store Apps (49) - 输入: 获取输入设备信息, 虚拟键盘, Tab 导航, Pointer, Tap, Drag, Drop

作者:webabcd

介绍
重新想象 Windows 8 Store Apps 之 输入

  • 输入设备的相关信息
  • SIP(Soft Input Panel)的应用
  • Tab 键导航
  • Pointer - 指针,鼠标
  • Tap - 触摸
  • Drag 和 Drop

示例
1、演示如何获取输入设备的相关信息
Input/InputDeviceInfo.xaml

<Page
x:Class="XamlDemo.Input.InputDeviceInfo"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:XamlDemo.Input"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"> <Grid Background="Transparent">
<Grid Margin="120 0 0 0"> <ScrollViewer Margin="0 0 10 10">
<TextBlock Name="lblMsg" FontSize="14.667" TextWrapping="Wrap" />
</ScrollViewer> </Grid>
</Grid>
</Page>

Input/InputDeviceInfo.xaml.cs

/*
* 演示如何获取输入设备的相关信息
*/ using System;
using Windows.Devices.Input;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Navigation; namespace XamlDemo.Input
{
public sealed partial class InputDeviceInfo : Page
{
public InputDeviceInfo()
{
this.InitializeComponent();
} protected override void OnNavigatedTo(NavigationEventArgs e)
{
// 获取鼠标设备的相关信息
MouseCapabilities mouseCapabilities = new MouseCapabilities();
lblMsg.Text = "MouseCapabilities.MousePresent: " + mouseCapabilities.MousePresent; // 是否存在鼠标
lblMsg.Text += Environment.NewLine;
lblMsg.Text += "MouseCapabilities.HorizontalWheelPresent: " + mouseCapabilities.HorizontalWheelPresent; // 是否有水平滚轮
lblMsg.Text += Environment.NewLine;
lblMsg.Text += "MouseCapabilities.VerticalWheelPresent: " + mouseCapabilities.VerticalWheelPresent; // 是否有垂直滚轮
lblMsg.Text += Environment.NewLine;
lblMsg.Text += "MouseCapabilities.SwapButtons: " + mouseCapabilities.SwapButtons; // 是否交换了左右按钮
lblMsg.Text += Environment.NewLine;
lblMsg.Text += "MouseCapabilities.NumberOfButtons: " + mouseCapabilities.NumberOfButtons; // 鼠标上的按钮数量
lblMsg.Text += Environment.NewLine;
lblMsg.Text += Environment.NewLine; // 获取硬件键盘设备的相关信息
KeyboardCapabilities keyboardCapabilities = new KeyboardCapabilities();
lblMsg.Text += "KeyboardCapabilities.KeyboardPresent: " + keyboardCapabilities.KeyboardPresent; // 是否存在硬件键盘
lblMsg.Text += Environment.NewLine;
lblMsg.Text += Environment.NewLine; // 获取触摸设备的相关信息
TouchCapabilities touchCapabilities = new TouchCapabilities();
lblMsg.Text += "TouchCapabilities.TouchPresent: " + touchCapabilities.TouchPresent; // 是否存在触摸设备
lblMsg.Text += Environment.NewLine;
lblMsg.Text += "TouchCapabilities.Contacts: " + touchCapabilities.Contacts; // 触摸设备所支持的多点触摸的点数
lblMsg.Text += Environment.NewLine;
lblMsg.Text += Environment.NewLine; // 获取 Pointer 设备(Touch, Pen, Mouse)的相关信息
var pointerDeviceList = PointerDevice.GetPointerDevices();
int displayIndex = ;
foreach (PointerDevice pointerDevice in pointerDeviceList)
{
displayIndex++; lblMsg.Text += "Pointer Device Index: " + displayIndex;
lblMsg.Text += Environment.NewLine;
lblMsg.Text += "PointerDevice.PointerDeviceType: " + pointerDevice.PointerDeviceType; // Pointer 类型(Touch, Pen, Mouse)
lblMsg.Text += Environment.NewLine;
lblMsg.Text += "PointerDevice.IsIntegrated: " + pointerDevice.IsIntegrated; // 是否是集成设备
lblMsg.Text += Environment.NewLine;
lblMsg.Text += "PointerDevice.MaxContacts: " + pointerDevice.MaxContacts; // 最大的同时触摸点数
lblMsg.Text += Environment.NewLine;
lblMsg.Text += "PointerDevice.PhysicalDeviceRect: " + pointerDevice.PhysicalDeviceRect; // 物理设备的 Rect
lblMsg.Text += Environment.NewLine;
lblMsg.Text += "PointerDevice.ScreenRect: " + pointerDevice.ScreenRect; // Pointer 设备所支持的屏幕的 Rect
lblMsg.Text += Environment.NewLine;
lblMsg.Text += Environment.NewLine;
}
}
}
}

2、演示 SIP(Soft Input Panel)的应用
Input/Keyboard/Demo.xaml

<Page
x:Class="XamlDemo.Input.Keyboard.Demo"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:XamlDemo.Input.Keyboard"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"> <Grid Background="Transparent">
<StackPanel Margin="120 0 0 0"> <!--
TextBox - 文本输入框
IsTextPredictionEnabled - 是否启用“自动完成”,默认值 true
IsSpellCheckEnabled - 是否启用拼音检查,默认值 false
-->
<TextBox IsTextPredictionEnabled="True" IsSpellCheckEnabled="True" Margin="0 0 10 0" /> <!--
InputScope - 限制 SIP 的输入范围,即设置 SIP 的布局方式
-->
<TextBox InputScope="Default" Margin="0 10 10 0" /> <TextBox KeyDown="TextBox_KeyDown_1" Margin="0 10 10 0">
<TextBox.InputScope>
<InputScope>
<InputScope.Names>
<InputScopeName NameValue="TelephoneNumber" />
</InputScope.Names>
</InputScope>
</TextBox.InputScope>
</TextBox> <!--
对于 ReadOnly 的输入框,即使获取到焦点也不会弹出虚拟键盘
-->
<TextBox Name="txtReadOnly" IsReadOnly="True" Margin="0 10 10 0" /> </StackPanel>
</Grid>
</Page>

Input/Keyboard/Demo.xaml.cs

/*
* 演示 SIP(Soft Input Panel)的应用
*
* 注:
* 1、TextBox, RichEditBox, PasswordBox 等文本输入框获取焦点后,会自动显示虚拟键盘(对于 ReadOnly 的输入框,即使获取到焦点也不会弹出虚拟键盘)
* 2、键盘相关的事件有 KeyDown 和 KeyUp
* 3、WinRT 的 SIP 支持的 InputScope 类型详见 Windows.UI.Xaml.Input.InputScopeNameValue 枚举
*
*
* Windows.UI.ViewManagement.InputPane - 软键盘面板
* GetForCurrentView() - 获取当前的 InputPane 对象
* OccludedRect - 软键盘面板所占用的矩形区域
* Hiding - 软键盘隐藏时触发的事件
* Showing - 软键盘显示时触发的事件
*
*
* 如果需要检测当前某个虚拟按键的状态,可以用如下方法:
* CoreWindow.GetAsyncKeyState(VirtualKey virtualKey)
* CoreWindow.GetKeyState(VirtualKey virtualKey)
*
* 监测键盘事件可以通过 CoreWindow.KeyDown 事件
* 关于 CoreWindow 的更多内容请参见:Feature/CoreDemo.xaml.cs
*/ using System;
using Windows.System;
using Windows.UI.Core;
using Windows.UI.Popups;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Input; namespace XamlDemo.Input.Keyboard
{
public sealed partial class Demo : Page
{
public Demo()
{
this.InitializeComponent(); this.Loaded += Demo_Loaded;
} async void Demo_Loaded(object sender, RoutedEventArgs e)
{
// 检测虚拟按键当前的状态
CoreVirtualKeyStates capitalLockState = Windows.UI.Xaml.Window.Current.CoreWindow.GetKeyState(VirtualKey.CapitalLock);
if (capitalLockState == CoreVirtualKeyStates.Locked)
{
await new MessageDialog("您的键盘处于“大写”输入状态").ShowAsync();
}
} private void TextBox_KeyDown_1(object sender, KeyRoutedEventArgs e)
{
// 判断用户是否按下了 SIP 上的回车键
if (e.Key == VirtualKey.Enter)
{
// 将焦点移出文本输入框,虚拟键盘会自动隐藏
txtReadOnly.Focus(FocusState.Programmatic);
}
}
}
}

3、演示 Control 的 Tab 导航相关属性的应用
Input/Keyboard/TabNavigation.xaml

<Page
x:Class="XamlDemo.Input.Keyboard.TabNavigation"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:XamlDemo.Input.Keyboard"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"> <Grid Background="Transparent">
<StackPanel Margin="120 0 0 0"> <!--
演示 Control 的 Tab 导航相关属性的应用 Control - 控件
TabIndex - Tab 导航的顺序,默认值为 int.MaxValue
IsTabStop - 是否加入 Tab 导航,默认值为 true
TabNavigation - Tab 导航的工作方式。经测试,没什么效果
--> <Button Content="button 1" TabIndex="3" TabNavigation="Once" />
<Button Content="button 2" Margin="0 10 0 0" TabIndex="1" />
<Button Content="button 3" Margin="0 10 0 0" IsTabStop="False" />
<Button Content="button 4" Margin="0 10 0 0" TabIndex="4" />
<Button Content="button 5" Margin="0 10 0 0" TabIndex="2" /> <ListBox Width="200" Height="300" Margin="0 10 0 0" HorizontalAlignment="Left" VerticalAlignment="Top">
<ListBox.Items>
<ListBoxItem Content="ListBoxItem1" />
<ListBoxItem Content="ListBoxItem2" />
<ListBoxItem Content="ListBoxItem3" />
</ListBox.Items>
</ListBox> </StackPanel>
</Grid>
</Page>

4、演示 Pointer 相关事件的应用
Input/Touch/Pointer.xaml

<Page
x:Class="XamlDemo.Input.Touch.Pointer"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:XamlDemo.Input.Touch"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"> <Grid Background="Transparent">
<Grid Margin="120 0 0 0"> <Rectangle Name="rectangle" Width="400" Height="100" Fill="Orange" HorizontalAlignment="Left" VerticalAlignment="Top" /> <ScrollViewer Margin="0 110 0 10" HorizontalAlignment="Stretch" VerticalAlignment="Top">
<TextBlock Name="lblMsg" FontSize="14.667" TextWrapping="Wrap" />
</ScrollViewer> </Grid>
</Grid>
</Page>

Input/Touch/Pointer.xaml.cs

/*
* 演示 Pointer 相关事件的应用
*
*
* PointerRoutedEventArgs - 指针路由事件的事件参数
* OriginalSource - 引发此路由事件的对象
* Handled - 是否将事件标记为已处理
* KeyModifiers - 获取当前按下的辅助键(Windows.System.VirtualKeyModifiers 枚举)
* None, Control, Menu, Shift, Windows
* Pointer - 获取 Pointer 对象
* Pointer.PointerDeviceType - 指针设备的类型(Touch, Pen, Mouse)
* Pointer.PointerId - 指针标识,可以根据此属性来区分多点触摸场景下的不同指针
* GetCurrentPoint(UIElement relativeTo) - 返回当前指针相对于指定元素的 PointerPoint 对象
* PointerPoint.Position - 指针的位置
* PointerPoint.Properties - 返回 PointerPointProperties 对象,有一堆 PointerPoint 的相关属性
* GetIntermediatePoints(UIElement relativeTo) - 返回与此事件关联的 PointerPoint 的中间值(平均值)集合
*
*
* HoldingRoutedEventArgs - Holding 路由事件的事件参数
* OriginalSource - 引发此路由事件的对象
* Handled - 是否将事件标记为已处理
* PointerDeviceType - 指针设备的类型(Touch, Pen, Mouse)
* GetPosition(UIElement relativeTo) - 返回当前指针相对于指定元素的位置
* HoldingState - Holding 状态(Windows.UI.Input.HoldingState 枚举)
* Started, Completed, Canceled
*
*
* UIElement.CapturePointer(Pointer value) - 捕获此 UIElement 上的指针,即在 UIElement 之外也可以响应 PointerReleased 事件
* UIElement.ReleasePointerCapture(Pointer value) - 释放对此 UIElement 上的指针的捕获
* UIElement.ReleasePointerCaptures() - 释放全部指针的捕获
*
*
* 注:通过 CoreWindow.PointerCursor 设置指针光标的样式
*/ using System;
using Windows.UI.Core;
using Windows.UI.Input;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Shapes; namespace XamlDemo.Input.Touch
{
public sealed partial class Pointer : Page
{
public Pointer()
{
this.InitializeComponent(); // 修改指针光标的样式
Windows.UI.Xaml.Window.Current.CoreWindow.PointerCursor = new CoreCursor(CoreCursorType.Cross, ); rectangle.PointerEntered += rectangle_PointerEntered;
rectangle.PointerExited += rectangle_PointerExited;
rectangle.PointerPressed += rectangle_PointerPressed;
rectangle.PointerReleased += rectangle_PointerReleased;
rectangle.PointerMoved += rectangle_PointerMoved;
rectangle.PointerWheelChanged += rectangle_PointerWheelChanged;
rectangle.PointerCanceled += rectangle_PointerCanceled;
rectangle.PointerCaptureLost += rectangle_PointerCaptureLost;
rectangle.Holding += rectangle_Holding;
} void rectangle_Holding(object sender, HoldingRoutedEventArgs e)
{
lblMsg.Text += "Holding";
lblMsg.Text += Environment.NewLine;
} void rectangle_PointerCaptureLost(object sender, PointerRoutedEventArgs e)
{
lblMsg.Text += "PointerCaptureLost " + e.Pointer.PointerId;
lblMsg.Text += Environment.NewLine;
} void rectangle_PointerCanceled(object sender, PointerRoutedEventArgs e)
{
lblMsg.Text += "PointerCanceled " + e.Pointer.PointerId;
lblMsg.Text += Environment.NewLine;
} void rectangle_PointerWheelChanged(object sender, PointerRoutedEventArgs e)
{
// 判断鼠标滚轮的滚动方向
lblMsg.Text += "PointerWheelChanged " + e.GetCurrentPoint(null).Properties.MouseWheelDelta;
lblMsg.Text += Environment.NewLine;
} void rectangle_PointerMoved(object sender, PointerRoutedEventArgs e)
{
// lblMsg.Text += "PointerMoved " + e.Pointer.PointerId;
// lblMsg.Text += Environment.NewLine;
} void rectangle_PointerReleased(object sender, PointerRoutedEventArgs e)
{
lblMsg.Text += "PointerReleased " + e.Pointer.PointerId;
lblMsg.Text += Environment.NewLine; ((Rectangle)sender).ReleasePointerCapture(e.Pointer);
} void rectangle_PointerPressed(object sender, PointerRoutedEventArgs e)
{
lblMsg.Text += "PointerPressed " + e.Pointer.PointerId;
lblMsg.Text += Environment.NewLine; bool hasCapture = ((Rectangle)sender).CapturePointer(e.Pointer);
lblMsg.Text += "Got Capture: " + hasCapture;
lblMsg.Text += Environment.NewLine; PointerPointProperties props = e.GetCurrentPoint(null).Properties;
lblMsg.Text += "接触区域的边框: " + props.ContactRect.ToString();
lblMsg.Text += Environment.NewLine;
lblMsg.Text += "原始输入的边框: " + props.ContactRectRaw.ToString();
lblMsg.Text += Environment.NewLine;
lblMsg.Text += "触笔设备的筒状按钮是否按下: " + props.IsBarrelButtonPressed.ToString();
lblMsg.Text += Environment.NewLine;
lblMsg.Text += "输入是否已由指针设备取消: " + props.IsCanceled.ToString();
lblMsg.Text += Environment.NewLine;
lblMsg.Text += "输入是否来自橡皮擦: " + props.IsEraser.ToString();
lblMsg.Text += Environment.NewLine;
lblMsg.Text += "输入是否来自滚轮: " + props.IsHorizontalMouseWheel.ToString();
lblMsg.Text += Environment.NewLine;
lblMsg.Text += "指针是否在触摸屏的范围内: " + props.IsInRange.ToString();
lblMsg.Text += Environment.NewLine;
lblMsg.Text += "是否是反转的值: " + props.IsInverted.ToString();
lblMsg.Text += Environment.NewLine;
lblMsg.Text += "输入是否来自鼠标左键: " + props.IsLeftButtonPressed.ToString();
lblMsg.Text += Environment.NewLine;
lblMsg.Text += "输入是否来自鼠标中键: " + props.IsMiddleButtonPressed.ToString();
lblMsg.Text += Environment.NewLine;
lblMsg.Text += "输入是否来自鼠标右键: " + props.IsRightButtonPressed.ToString();
lblMsg.Text += Environment.NewLine;
lblMsg.Text += "输入是否来自主要指针: " + props.IsPrimary.ToString();
lblMsg.Text += Environment.NewLine;
lblMsg.Text += "第一个扩展按钮的按下状态: " + props.IsXButton1Pressed.ToString();
lblMsg.Text += Environment.NewLine;
lblMsg.Text += "第二个扩展按钮的按下状态: " + props.IsXButton2Pressed.ToString();
lblMsg.Text += Environment.NewLine;
lblMsg.Text += "指针施加到触摸屏上的力度(0.0-1.0): " + props.Pressure.ToString();
lblMsg.Text += Environment.NewLine;
lblMsg.Text += "触摸是否被拒绝了: " + props.TouchConfidence.ToString();
lblMsg.Text += Environment.NewLine;
lblMsg.Text += "指针状态的更改类型: " + props.PointerUpdateKind.ToString(); // PointerUpdateKind 枚举:LeftButtonPressed, LeftButtonReleased 等等
lblMsg.Text += Environment.NewLine;
lblMsg.Text += "指针设备相关的 Orientation: " + props.Orientation.ToString();
lblMsg.Text += Environment.NewLine;
lblMsg.Text += "指针设备相关的 Twist: " + props.Twist.ToString();
lblMsg.Text += Environment.NewLine;
lblMsg.Text += "指针设备相关的 XTilt: " + props.XTilt.ToString();
lblMsg.Text += Environment.NewLine;
lblMsg.Text += "指针设备相关的 YTiltYTilt: " + props.YTilt.ToString();
lblMsg.Text += Environment.NewLine; // 输入设备相关
// props.HasUsage(uint usagePage, uint usageId)
// props.GetUsageValue(uint usagePage, uint usageId)
} void rectangle_PointerExited(object sender, PointerRoutedEventArgs e)
{
lblMsg.Text += "PointerExited " + e.Pointer.PointerId;
lblMsg.Text += Environment.NewLine;
} void rectangle_PointerEntered(object sender, PointerRoutedEventArgs e)
{
lblMsg.Text += "PointerEntered " + e.Pointer.PointerId;
lblMsg.Text += Environment.NewLine;
}
}
}

5、演示 Tap 相关事件的应用
Input/Touch/Tap.xaml

<Page
x:Class="XamlDemo.Input.Touch.Tap"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:XamlDemo.Input.Touch"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"> <Grid Background="Transparent">
<StackPanel Margin="120 0 0 0"> <Rectangle Name="rectangle" Width="400" Height="100" Fill="Orange" HorizontalAlignment="Left" /> <TextBlock Name="lblMsg" FontSize="14.667" TextWrapping="Wrap" Margin="0 10 0 0" /> </StackPanel>
</Grid>
</Page>

Input/Touch/Tap.xaml.cs

/*
* 演示 Tap 相关事件的应用
*
*
* TappedRoutedEventArgs - Tap 路由事件的事件参数
* DoubleTappedRoutedEventArgs - DoubleTap 路由事件的事件参数
* RightTappedRoutedEventArgs - RightTap 路由事件的事件参数
* OriginalSource - 引发此路由事件的对象
* Handled - 是否将事件标记为已处理
* PointerDeviceType - 指针设备的类型(Touch, Pen, Mouse)
* GetPosition(UIElement relativeTo) - 返回当前指针相对于指定元素的位置
*
*
* HoldingRoutedEventArgs - Holding 路由事件的事件参数
* OriginalSource - 引发此路由事件的对象
* Handled - 是否将事件标记为已处理
* PointerDeviceType - 指针设备的类型(Touch, Pen, Mouse)
* GetPosition(UIElement relativeTo) - 返回当前指针相对于指定元素的位置
* HoldingState - Holding 状态(Windows.UI.Input.HoldingState 枚举)
* Started, Completed, Canceled
*/ using System;
using Windows.UI.Xaml.Controls; namespace XamlDemo.Input.Touch
{
public sealed partial class Tap : Page
{
public Tap()
{
this.InitializeComponent(); rectangle.IsTapEnabled = true; // 默认值就是 true
rectangle.IsDoubleTapEnabled = true; // 默认值就是 true
rectangle.IsRightTapEnabled = true; // 默认值就是 true
rectangle.IsHoldingEnabled = true; // 默认值就是 true rectangle.Tapped += rectangle_Tapped;
rectangle.DoubleTapped += rectangle_DoubleTapped;
rectangle.RightTapped += rectangle_RightTapped;
rectangle.Holding += rectangle_Holding;
} void rectangle_Holding(object sender, Windows.UI.Xaml.Input.HoldingRoutedEventArgs e)
{
lblMsg.Text += "Holding";
lblMsg.Text += Environment.NewLine;
} void rectangle_RightTapped(object sender, Windows.UI.Xaml.Input.RightTappedRoutedEventArgs e)
{
lblMsg.Text += "RightTapped";
lblMsg.Text += Environment.NewLine;
} void rectangle_DoubleTapped(object sender, Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs e)
{
lblMsg.Text += "DoubleTapped";
lblMsg.Text += Environment.NewLine;
} void rectangle_Tapped(object sender, Windows.UI.Xaml.Input.TappedRoutedEventArgs e)
{
lblMsg.Text += "Tapped";
lblMsg.Text += Environment.NewLine;
}
}
}

6、关于 AllowDrop, Drop, DragEnter, DragOver, DragLeave
Input/Touch/DragDrop.xaml

<Page
x:Class="XamlDemo.Input.Touch.DragDrop"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:XamlDemo.Input.Touch"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"> <Grid Background="Transparent">
<StackPanel Margin="120 0 0 0"> <TextBlock Name="lblMsg" FontSize="14.667" TextWrapping="Wrap">
<Run>关于 AllowDrop, Drop, DragEnter, DragOver, DragLeave 等详见:Controls/GridView/DragItem.xaml</Run>
</TextBlock> </StackPanel>
</Grid>
</Page>

OK
[源码下载]

重新想象 Windows 8 Store Apps (49) - 输入: 获取输入设备信息, 虚拟键盘, Tab 导航, Pointer, Tap, Drag, Drop的更多相关文章

  1. 重新想象 Windows 8 Store Apps (60) - 通信: 获取网络信息, 序列化和反序列化

    [源码下载] 重新想象 Windows 8 Store Apps (60) - 通信: 获取网络信息, 序列化和反序列化 作者:webabcd 介绍重新想象 Windows 8 Store Apps ...

  2. 重新想象 Windows 8 Store Apps 系列文章索引

    [源码下载][重新想象 Windows 8.1 Store Apps 系列文章] 重新想象 Windows 8 Store Apps 系列文章索引 作者:webabcd 1.重新想象 Windows ...

  3. 重新想象 Windows 8 Store Apps (50) - 输入: 边缘手势, 手势操作, 手势识别

    [源码下载] 重新想象 Windows 8 Store Apps (50) - 输入: 边缘手势, 手势操作, 手势识别 作者:webabcd 介绍重新想象 Windows 8 Store Apps ...

  4. 重新想象 Windows 8 Store Apps (51) - 输入: 涂鸦板

    [源码下载] 重新想象 Windows 8 Store Apps (51) - 输入: 涂鸦板 作者:webabcd 介绍重新想象 Windows 8 Store Apps 之 涂鸦板 通过 Poin ...

  5. Windows 8 Store Apps

    重新想象 Windows 8 Store Apps 系列文章索引 Posted on 2013-11-18 08:33 webabcd 阅读(672) 评论(3) 编辑 收藏 [源码下载] 重新想象 ...

  6. 重新想象 Windows 8 Store Apps (38) - 契约: Search Contract

    [源码下载] 重新想象 Windows 8 Store Apps (38) - 契约: Search Contract 作者:webabcd 介绍重新想象 Windows 8 Store Apps 之 ...

  7. 重新想象 Windows 8 Store Apps (39) - 契约: Share Contract

    [源码下载] 重新想象 Windows 8 Store Apps (39) - 契约: Share Contract 作者:webabcd 介绍重新想象 Windows 8 Store Apps 之  ...

  8. 重新想象 Windows 8 Store Apps (56) - 系统 UI: Scale, Snap, Orientation, High Contrast 等

    [源码下载] 重新想象 Windows 8 Store Apps (56) - 系统 UI: Scale, Snap, Orientation, High Contrast 等 作者:webabcd ...

  9. 重新想象 Windows 8 Store Apps (70) - 其它: 文件压缩和解压缩, 与 Windows 商店相关的操作, app 与 web, 几个 Core 的应用, 页面的生命周期和程序的生命周期

    [源码下载] 重新想象 Windows 8 Store Apps (70) - 其它: 文件压缩和解压缩, 与 Windows 商店相关的操作, app 与 web, 几个 Core 的应用, 页面的 ...

随机推荐

  1. web端视频直播网站的弊端和优势

    在YY上市前后,国内涌出一批类YY视频直播或9158的秀场类网站. 比如六间房,酷六等等 这种web端视频服务基本依靠web本身的特性,用flash直播,靠CDN提供服务. 但是这样的架构有2个问题 ...

  2. dolby逝世:纪念一下

     杜比公司的成立快50年了(1965),想想中国1965年在干啥.中国怎么可能有.   小科普一下,dolby的成功有3个时间点和技术,第一次是在英国开发了dolby B降噪技术,是用在早期的卡带降噪 ...

  3. SQL Server 2012 各版本功能比较

    有关不同版本的 SQL Server 2012 所支持的功能的详细信息. 功能名称 Enterprise 商业智能 Standard Web Express with Advanced Service ...

  4. adb使用

    一.使用adb删除系统应用,如Launcher.apk adb root                 获取root权限 adb remount          挂载系统的读写权限 adb she ...

  5. Mac OS X Tips

    命令行查看Mac OS X版本 $ sw_vers ProductName: Mac OS X ProductVersion: BuildVersion: 14D131 Mac OS X截图 不要使用 ...

  6. saiku缓存整理

    使用saiku的人,肯定都有这么一个经历,查询了一次多维分析数据表,第二次之后就特别快,因为它缓存了结果,可问题是过了一天,甚至几天,来源数据早都更换了,可还是这个缓存结果.问题来了,缓存不失效! 那 ...

  7. git Please move or remove them before you can merge. 错误解决方案

    git pull 时 往往会遇到各种各样的问题 ,下面是常遇到的一种状况 Updating 7c9e086..936acacerror: The following untracked working ...

  8. 关于IT概念的一些思考

    同事提及“软件工程.软件生命周期.项目管理.CMMI.IPD.RUP.UML及UML建模.面向对象分析与设计.需求分析.系统分析与设计……等等,它们到底是什么?它们之间有什么关系?”   下面是个人见 ...

  9. ops中set_sysclk set_clkdiv set_pll详解

    在看Alsa soc驱动的是时候,在snd_soc_dai_driver.ops中有3个字段 .set_sysclk .set_pll .set_clkdiv 开始的时候,总是晕头转向,感觉这3个回调 ...

  10. 读书笔记_Effective_C++_条款四十一:了解隐式接口和编译期多态

    从本条款开始,就进入了全书的第七部分:模板与泛型编程.模板与泛型在C++中是非常重要的部分,还记得本书第一章时,把C++视为一个联邦,它由四个州政府组成,其中一个政府就是模板与泛型了. 本条款是一个介 ...