当前位置:网站首页>2019-8-8-wpf - touch and mouse click response in non customer area
2019-8-8-wpf - touch and mouse click response in non customer area
2022-04-22 11:30:00 【lindexi】
title |
author |
date |
CreateTime |
categories |
WPF Touch and mouse click responses in non customer areas |
lindexi |
2019-08-08 16:48:31 +0800 |
2019-07-02 17:15:20 +0800 |
WPF |
Default in WPF There are mouse events that do not respond to non client areas , But respond to touch events
Without afternoon tea lsj Tell me , In the project, in the non customer area of a customized window, you can't click a button with the mouse , But with touch, you can click the button . At first, Ben goldfish thought it was a problem repaired before , But as a goldfish, I don't remember how to fix it , In order to make this goldfish solve the problem of touch or mouse next time , So I wrote this blog
This article will tell you in WPF There are touch and mouse click responses for non customer areas
Before this article begins , We need to know the non customer area Non-client Area The concept of , In fact, it is the general meaning of the window title bar , Details please see Learn together WPF series (3): forms - Robin Zhang and WPF Use WindowChrome, While customizing the window title bar, the original window style is retained to the greatest extent ( similar UWP/Chrome) - walterlv
On the blackboard , The following knowledge points need to be tested
default WPF The program supports responding in non client areas Touch touch , But does not respond to mouse clicks and Pointer touch
If you need to support mouse click in the non customer area, that is, the window title bar , Then please add additional attributes to the button WindowChrome.IsHitTestVisibleInChrome by true Support mouse click
<Button WindowChrome.IsHitTestVisibleInChrome="True"/>
- 1.
there WindowChrome.IsHitTestVisibleInChrome Support inheritance , That is, you can set... In the window , In this way, all buttons in the window support clicking on the title bar
How to open Pointer Please see the news win10 Support to raise the touch to the mouse event by default open Pointer news
Me and lsj Use spy++ Know in WPF When you click on the title bar, you can receive Windows Mouse message , That is, here is WPF To deal with the
Me and lsj Say maybe it was before WPF When the boss of the frame wrote it, he didn't know there was a touch , So the mouse event is handled . After adding the touch, I forgot to remove , So touch can use . Now? lsj Looking at WPF Source code , Want to find out how to make the title bar support touch but not mouse click
WindowChrome Class (System.Windows.Shell)
WindowChrome.IsHitTestVisibleInChrome Attached Property (Microsoft.Windows.Shell)
About WM_NCHITTEST news - Gang.Wang
WM_TOUCH message - Windows applications
版权声明
本文为[lindexi]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204221039401246.html
边栏推荐
- 824. 山羊拉丁文 / 剑指 Offer II 012. 左右两边子数组的和相等
- OpenMLDB Pulsar Connector:高效打通实时数据到特征工程
- 滚动条样式修改
- Discrete mathematics Chapter 1
- 基于 TiDB 的 Apache APISIX 高可用配置中心的最佳实践
- Redis environment installation
- Talent Plan 学习营初体验:交流+坚持 开源协作课程学习的不二路径
- Secondary vocational network security D - file upload
- 接口自动化-Session鉴定解决方案
- 找国企、央企、上市公司投资人,我选择塔米狗!
猜你喜欢

进程池创建多进程下载网页

Create object memory analysis and inheritance

PTC: major change in ESG product R & D of construction machinery

在安装mySQL出现这种问题如何解决呢?

Looking for investors of state-owned enterprises, central enterprises and listed companies, I choose Tami dog!

Que sait la commande ADB? Les ordres de la BAD arrivent.

ES6 learning notes 4 numerical representation related to numerical expansion (octal representation) (reprinted, the memo is not my original)

云原生虚拟化:基于 Kubevirt 构建边缘计算实例

大家都在努力,你凭什么不努力

FinBI连接本机mysql
随机推荐
MySQL 学习笔记
11. (map data section) how to download and use OSM data
.env. Dev does not take effect
机器学习基础知识
PTC: 工程机械ESG产品研发重大变革
leetcode:347. 前 K 个高频元素
微信小程序使用VantUI框架(Vant Weapp) yarn安装
卷积神经网络
js获取dom元素宽高
Secondary vocational network security D - file upload
200. 岛屿数量
ES6学习笔记之4数值表示法有关数值的扩展(8进制表示法)(转载,备忘非我原创)
2022 年度广东省职业院校学生专业技能大赛网络安全(中职组)赛项样题
L'applet Wechat est installé en utilisant le cadre vantui (vantweapp) Yarn
Redis 解决键冲突
824. 山羊拉丁文 / 剑指 Offer II 012. 左右两边子数组的和相等
Fundamentals of machine learning
全新威马M7同时斩获“iF设计奖”、“红点产品设计大奖”两项国际大奖
Synchronized锁及其膨胀
直播课堂系统平台软件源码亲测可用