How to set the location of a WPF window?

前端 未结 4 2119
半阙折子戏
半阙折子戏 2020-12-06 04:31

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

4条回答
  •  时光取名叫无心
    2020-12-06 04:34

    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

提交回复
热议问题