Question

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?

Was it helpful?

Solution

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) {}
}

OTHER TIPS

The PageFunction allows you to return a value.

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top