fip*_*n88 3 c# windows-10 windows-10-mobile
我在适用于Windows 10和Windows 10 Mobile的Universal App上工作.有谁知道如何检查Windows 10是否在平板电脑模式下运行?
我在这里找到了这个问题但是对于Windows窗体:我如何检测Window 10何时在Windows窗体应用程序中进入平板电脑模式?
谢谢
您查询UserInteractionMode - 这是该链接的示例代码
switch(UIViewSettings.GetForCurrentView().UserInteractionMode)
{
case UserInteractionMode.Mouse:
VisualStateManager.GoToState(this, "MouseLayout", true);
break;
case UserInteractionMode.Touch:
default:
VisualStateManager.GoToState(this, "TouchLayout", true);
break;
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1042 次 |
| 最近记录: |