Y.Yanavichus
Y.Yanavichus

Reputation: 2417

How to automatically position window like Popup?

I created virtual keyboard implemented as custom control inhereted from Window. I want to know if there 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.

Upvotes: 1

Views: 163

Answers (2)

Y.Yanavichus
Y.Yanavichus

Reputation: 2417

I implemented custom algorithm.

Upvotes: 0

Matěj Zábský
Matěj Zábský

Reputation: 17272

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.

Upvotes: 1

Related Questions