Return an object from a popup window

前端 未结 6 480
面向向阳花
面向向阳花 2020-12-24 12:23

I have a Window which pop-ups another Window. I want the second Window to be able to return an object to the first Window when a button is pressed. How would I do this?

6条回答
  •  死守一世寂寞
    2020-12-24 12:41

    I know this is an old one, but I was looking for the same information for a WPF application I'm working on. I found this site to be really helpful:

    http://www.dreamincode.net/forums/topic/206458-the-right-way-to-get-values-from-form1-to-form2/

    This is written for Windows Forms, but if you ignore the part about passing values to the new window, it still worked and had some really good information.

    On a side note, to pass values to the new window, this was really helpful:

    WPF passing string to new window

提交回复
热议问题