I have a List View in which I have defined a custom cell as a user control.
In the custom cell I given user hyperlink, I am showing a WPF dialog when user clicks on a hyperlink.
I want WPF dialog comes just above the hyperlink..
Please let me know how can I acheive this or how to set the location of the dialog so that it just comes above the hyperlink.
if you set .Left of the window more then monitor size (2000 works for me) window goes on second monitor and you can then "maximize"
You would need to get the coordinates of the hyperlink and then set the window position as shown here:
http://blog.fossmo.net/post/How-to-set-the-windows-position-in-WPF.aspx
To get the relative/absolute positions of elements have a look here for some tips:
http://ivolo.mit.edu/post/WPF-Mouse-and-Point-Acrobatics.aspx
You need to set the
WindowStartupLocation
toManual
(which is the default however) as well as setting theTop
andLeft
property values.Source
Window.Left and Window.Top