title author date CreateTime categories
win10 17025 触摸bug
lindexi
2018-09-01 09:50:18 +0800
2018-2-13 17:23:3 +0800
WPF UWP 触摸

This article is written in both English and Chinese.
本文使用中文英文两个版本。
在 win10 的 17025(直到 17134 也就是正式版 1803 也没有修复) 可以容易让 UWP 触摸失效。做法是创建一个窗口背景是透明的 wpf 程序,把他置顶,这时所有 uwp 程序就无法触摸。在正式版 17134 是所有的触摸程序都触摸失效,除了可以把触摸转鼠标的程序如 VisualStudio 和 QQ 还能使用,如 Edge 和 Chrome 都无法使用。
I found the easy way to make the UWP app touch not work in win10 17025(until 17134). To create a wpf app with transparent background and make it Topmost, you can see all of the UWP app's touch not work.

中文

写英文的原因是给微软报这个问题,现在发在 微软反馈 希望大家投票。

步骤:

  1. 创建一个 wpf 程序

  2. 设置 wpf 的窗口最大化

  3. 设置 wpf 程序的背景为透明

  4. 启动 wpf 程序

这时就可以看到 Edge 等软件都无法触摸

在检查的时候可以使用ManipulationDemo,可以看到在触摸的时候没有 Pointer 消息。

下面是关闭 wpf 程序之后,可以看到最下面有 Pointer 消息

下面是这个wpf软件代码:

        public MainWindow()
{
InitializeComponent(); AllowsTransparency = true;
WindowStyle = WindowStyle.None;
WindowState = WindowState.Maximized;
Background = Brushes.Transparent;
Topmost = true;
}

解决方案

最新的微软补丁August 30, 2018—KB4346783 修复了这个问题,只需要在用户的设备安装这个补丁就可以解决

下面是不使用补丁的方法

如果设置了一个窗口满足下面的属性

            WindowStyle = WindowStyle.None;
WindowState = WindowState.Maximized;

            WindowStyle="None"
AllowsTransparency="True"

那么就必须要设置 ResizeMode="NoResize" 不然就会出现下面的问题

  • 在 win10 17025-17134 版本,如果同时设置AllowsTransparency = true;窗口下面所有程序触摸失效

  • 还原窗口再最大化,窗口出现偏移

  • 切换屏幕,窗口出现偏移

English

Step:

  1. Create a wpf app

  2. Set the wpf app's windows state is Maximized

  3. Set the wpf app's windows background is transparent

  4. Run the wpf app

Then you can see all of the uwp app's such as edge and setting touch not work.

You can use ManipulationDemo to help you see the Pointer message that cant get when touch. I use ManipulationDemo to find the pointer message have not be received. The app can only receive the mouse message.

I took an image that shows the pointer message when I closed the wpf app.

This is the wpf app's code:

        public MainWindow()
{
InitializeComponent(); AllowsTransparency = true;
WindowStyle = WindowStyle.None;
WindowState = WindowState.Maximized;
Background = Brushes.Transparent;
Topmost = true;
}

This is my system and I think in win10 17025 the windows cant make the app uses pointer message to work that exists another transparent background app in above.

Solution

Microsoft has fixed this issue in .NET Framework August 2018 Preview of Quality Rollup.

Addresses an issue where touch and mouse events were handled differently in Windows Presentation Foundation (WPF) applications that have a transparent overlay window.


If you have a Window that set the following properties.

            WindowStyle = WindowStyle.None;
WindowState = WindowState.Maximized;

Or

            WindowStyle="None"
AllowsTransparency="True"

You must set ResizeMode="NoResize" to avoid some problems as

  • All applications lost touch or stylus if a WPF transparent window covers on them.

  • Windows appears offset when set it to Maximized from Normal.

  • Windows appears offset when switch screen.

See c# - On Windows 10 (1803), all applications lost touch or stylus if a WPF transparent window covers on them

On Windows 10 (1803), all applications lost touch or stylus if a WPF transparent window covers on them - Developer Community

dotnet-campus/TouchIssueOnWindows10.0.17134: On Windows 10 (1803), all applications lost touch or stylus if a WPF transparent window covers on them

2018-9-1-win10-17025-触摸bug的更多相关文章

  1. win10 17025 触摸bug

    This article is written in both English and Chinese. 本文使用中文和英文两个版本. 在 win10 的 17025 可以容易让 UWP 触摸失效.做 ...

  2. Win10系统菜单打不开问题的解决,难道是Win10的一个Bug ?

    Win10左下角菜单打不开,好痛苦,点击右下角的时间也没反应,各种不爽,折磨了我好几天,重装又不忍心,实在费劲,一堆开发环境要安装,上网找了很多方法都不适用.今天偶然解决了,仔细想了下,难道是Win1 ...

  3. T470 Win10下触摸板手势

    T470 Win10下触摸板手势 学习了:https://forum.51nb.com/thread-1742490-1-1.html 三指横向竟然是alt+tab 学习了:http://www.xi ...

  4. mac安装win10后触摸板没有右键功能键的添加技巧

    一些mac用户也会在自己的笔记本电脑上安装windows10系统. 但最近有部分用户发现,安装上win10正式版后,发现无论点击触摸板哪个位置,都只有左键,根本无法右键的问题, 针对此问题,现笔者分享 ...

  5. WPF开发经验-实现Win10虚拟触摸键盘

    一 引入 项目有个需求,需要实现纯触控操作进行键盘输入.项目部署在Win10系统上,考虑有两种方案来实现. 通过调用Win10自带的触摸键盘来实现: 通过WPF实现一个触摸键盘来实现: 二 调用Win ...

  6. WIN10系统触摸板快捷键

    快捷的手势操作,有时候会让人脱离鼠标,只要不是非用不可的情况,基本上这些常用手势就能让我们摆脱鼠标携带不便或者桌子地方小的烦恼.iOS上的快捷手势很是受欢迎,win10上却鲜有人知晓,尤其是非开发人员 ...

  7. 移动端一个奇怪的触摸bug

    这两天遇到一个很奇怪的bug,在移动端,一个页面里所有的input框都不能点击,我查了一下,里面的没有设置readonly属性,只要页面滚动一下就可以用了,而且,只要我在真机测试的时候,f12开发者模 ...

  8. win10笔记本触摸板手势大全

  9. dotnet 从入门到放弃的 500 篇文章合集

    本文是记录我从入门到放弃写的博客 博客包括 C#.WPF.UWP.dotnet core .git 和 VisualStudio 和一些算法,所有博客使用 docx 保存 下载:dotnet 从入门到 ...

随机推荐

  1. luogu 5468 [NOI2019]回家路线 最短路/暴力

    想写一个 70 pts 算法,结果数据水,直接就切了 最短路: // luogu-judger-enable-o2 #include<bits/stdc++.h> using namesp ...

  2. R 大小写转换

    >x = "CAGTTTCTTGAGTCTGATTAATTCAGGTTTCGGGGT"#定义字符串变量x>tolower(x)[1] "cagtttcttga ...

  3. JAVA-IO模型(BIO,NIO,AIO)

    基本概念 阻塞和非阻塞 阻塞是进行读写时, 如果当时没有东西可读,或者暂时不可写, 程序就进入等待, 直到有东西可读或者可写为止 非阻塞是如果没有东西可读, 或者不可写, 读写函数马上返回, 而不会等 ...

  4. [BZOJ3236][AHOI2013]作业:树套树/莫队+分块

    分析 第一问随便搞,直接说第二问. 令原数列为\(seq\),\(pre_i\)为\(seq_i\)这个值上一个出现的位置,于是可以简化询问条件为: \(l \leq i \leq r\) \(a \ ...

  5. package.json保存

    # 确保已经进入项目目录 # 确定已经有 package.json,没有就通过 npm init # 创建,直接一路回车就好,后面再来详细说里面的内容. # 安装 webpack 依赖 npm ins ...

  6. PHP代码修改后提交,无法立即生效

    今天遇到一个坑爹的问题,就是我修改了PHP代码,提交到网站根目录以后,刷新浏览器居然无法立即生效,差不多得一分钟的样子再去刷新,才会看到更改后的效果. 出现这个问题的原因,是因为手头的项目需要较高的P ...

  7. Memcache和Redis复习总结

    Memcache Memcache是一个高性能的分布式的内存对象缓存系统,主要是用来缓存从MySQL数据库中查询的数据,减少对mysql数据库的压力. Memcache的工作流程: 当用户发生一个动态 ...

  8. 架构-层-Model:Model

    ylbtech-架构-层-Model:Model 1.返回顶部 1. Model,意思是模特儿,模特儿是英文“model”的音译.模特一般来说要五官端正,身材良好,有气质,展示能力强,另外身高要具备一 ...

  9. Oracle-数据导出和导入

    对数据库进行逻辑备份或数据转储,也就是对数据库实时导入.导出操作时,既可以使用常规的EXP/IMP客户端程序,也可以使用数据泵技术:IMPDP/EXPDP 使用数据泵导出或导入的优点: 1.数据泵导出 ...

  10. Delphi XE2 之 FireMonkey 入门(4) - 控件天生可做容器

    1.新建 FM(HD) 工程, 先添加 TLine(默认名称是 Line1);2.在 Line1 选择状态下添加 Button1;3.取消选择后添加 Button2 此时, Button1.Paren ...