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

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -