c# - How do I obtain the client coordinates where a Panel (Canvas, stackpanel, etc) is located in a WPF app? -


i need programatically obtain client coordinates panel (stackpanel instance) located. when using windows api, button has topleft , bottomright coordinate determines location within window in resides. how obtain coordinates stackpanel in wpf window ?

thank help,

john.

you can call transformtovisual() gets generaltransform relative other element can use container (frame/ window)

generaltransform gt = stackpanel1.transformtovisual(parentwindow);          point p = gt.transform(new point(0, 0)); 

Comments

Popular posts from this blog

Cursor error with postgresql, pgpool and php -

delphi - ESC/P programming! -

c++ - error: use of deleted function -