开发者

WPF InkCanvas: Being in ink mode can i fire children_mousedown, children_mouseup events?

开发者 https://www.devze.com 2023-03-25 02:48 出处:网络
In an InkCanvas, I have some UIElements as children. UIElements have events like uielement_mousedown, uielement_mouseup etc.

In an InkCanvas, I have some UIElements as children.

UIElements have events like uielement_mousedown, uielement_mouseup etc.

If I am in inkcanvas ink mode, can I fire the uielement_mousedown, uiel开发者_开发问答ement_mouseup events?


You can always fire the events and handle them from inkCanvas. Its just that they will not act to the user response in ink mode, so if child UIElements within the InkCanvas are fixed hosted (i.e. not added at run time), you can handle the moseEnter and mouseLeave events for the UIElement and in the MouseEnter you will change the the InkCanvas EditingMode to Select and at MouseLeave change the EditingMode to Ink. This way they become responsive to the user input (key, mouse etc.) while mouse is in them.

Does this answer your query?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号