开发者

How to automatically position window like Popup?

开发者 https://www.devze.com 2023-02-11 12:13 出处:网络
I created virtual keyboard implemented as custom control inhereted from Window. I want to know if the开发者_运维知识库re is a way to automatically position keyboard near TextBox like it does Popup whe

I created virtual keyboard implemented as custom control inhereted from Window. I want to know if the开发者_运维知识库re is a way to automatically position keyboard near TextBox like it does Popup when it's PopupPlacement property wasn't set. Or I should implement my custom algorithm?

UPDATE: I need to move my virtual keyboard from one TextBox to another and position it near *TextBox* so that it fits into the screen.


You could try using ToolTip class - it has an PlacementTarget property to allow you to lock it to specific UIElement. I think you should be able to modify it to suit your needs.


I implemented custom algorithm.

0

精彩评论

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