July 4th, 2010, 04:45 PM
Data binding maybe?
I have a program that has to WPF Windows.
In the first MainWindow I have a menu to open a an image file.
The menu opens an OpenDialog box to let the user choose an image, after the image is chosen an instance of the second WPF Window ImageWindow is created and the title is changed to the file path of the selected file
string filename = dlg.FileName;
Window imgWindow = new CToolsImageWindow();
// Change Image window to filename of image
imgWindow.Title = filename;
On the ImageWindow there is a Image Control named imgPicture, I want to change the imgPicture.Source to the file that was selected in the OpenDialog window, however I cannot access the imgPicture from the scope of MainWindow.
Does this require data binding or a simple access modifier or ? I changed the XAML to FieldModifier="public" for the imgPicture and nothing.
Am I making a gross conceptual error or what. I've spent hours trying to figure this out with no luck.
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.