1

I´m actually programming a WPF-application. Now, I´m just a beginner in WPF and so I´ve a problem:

In window A, there is a checkbox with some values. If I click on a button on window A, window B should open. On window B, I have a textfield and a save-button. When I click on the button on window B and close it, the value of the textfield should be in the checkbox on window A.

First, I programmed this with Windows Forms and there I solved it with BindingSource. This doesn´t work in WPF. How can I solve that?

Harald
  • 43
  • 1
  • 5

2 Answers2

2

Well, I would say that this nothign to do with WPF ot WindowsForms, as idea can be applied in both places. Just use a shared between different forms DataStructure that holds and information you need and changed from different forms. Just to give a simple idea:

public class DataStructure 
{
   //properties 
}

public Form1 : Form 
{
    public Form1(DataStructure ds) {}
}



public Form2 : Form 
{
    public Form2(DataStructure ds) {}
}
Tigran
  • 61,654
  • 8
  • 86
  • 123
0

The PageFunction allows you to return a value.

http://msdn.microsoft.com/en-us/library/ms615540.aspx

paparazzo
  • 44,497
  • 23
  • 105
  • 176
  • It is a return value from a Navigation Page. Now I am concerned with your use of lower case window. If you want the Windows from two or more separate application to communicate then that is more complex. If you have a master application and want to launch one of more children then Navigation is way to do that with two way communication. See the link in my answer. – paparazzo Oct 13 '11 at 16:27