WPF Applications Stop Responding to Touches after Adding or Removing Tablet Devices
WPF framework handles touch devices and events mostly using its own code and COM components instead of using the windows message loop. Unfortunately, there may be some bugs in the WPF touch handling codes. So we sometimes suffer from the WPF touch failures. This changes after Microsoft introducing .NET Framework 4.7, but the developers have to switch on the Pointer
message manually with some compliant issues.
In this article, I’ll post some codes of WPF to present its potential bugs of touch failure.
Good Framework Rely on Good Api —— Six API Design Principles
We have S.O.L.I.D principles of object-oriented programming, and we also have Software design patterns to solve general, reusable solution to a commonly occurring problem. But we don’t have public-accepted API design principles or patterns for us to develop better APIs.
But we still have many API designing experiences to conclude some design principals. This post concludes them.
Introducing MSTestEnhancer to make unit test result easy to read
Don’t you think that naming is very very hard? Especially naming for unit test method? Read this article for more data of naming: Don’t go into programming if you don’t have a good thesaurus - ITworld.
MSTestEnhancer is a contract-style unit test extension for MSTestv2. You can write method contract descriptions instead of writing confusing test method name when writing unit tests.
Support Horizontal Scrolling of TouchPad in WPF Application
Finally, Microsoft started to support touchpad like Apple did years ago. As Microsoft never do well in touchpad, WPF application even doesn’t support horizontal scrolling of touchpad. Also, WPF uses MouseWheel
to handle vertical scrolling, not a particular method.
This article contains my method to support horizontal scrolling of touchpad in a WPF application. It uses MouseWheel
indeed, but horizontals and verticals are all supported.
如何搭建一个基于 GitHub Pages 的 Jekyll 静态博客(目录)
GitHub Pages 为个人、组织和项目提供了展示一些页面的方式,GitHub 帮助页的 User, Organization, and Project Pages 页面就有说明。这里,我们使用 GitHub Pages 来搭建自己的博客,正好也是里面说的给 User 用作展示的页面的用途。当然,GitHub 甚至直接在官方页面中告诉大家,你可以用来当作你的博客使用,就是这句 Create a blog and spread your ideas. Whatever you want!(译:创建一个博客来传播你的想法,反正想做什么都行!)