Hi corner,
Mainwindow.xaml
(ref*)
http://www.wpf-tutorial.com/dialogs/the-openfiledialog/ (Read in Multiple files)
private void Next_Click(object sender, RoutedEventArgs e)
{
Window1 window1 = new Window1();
window1.Show();
this.Close();
}
Window1.xaml
private void Back_Button(object sender, RoutedEventArgs e)
{
MainWindow main = new MainWindow();
main.Show();
this.Close();
}
private void MessageBox_Button(object sender, RoutedEventArgs e)
{
}
{
MainWindow main = new MainWindow();
main.Show();
this.Close();
}
private void MessageBox_Button(object sender, RoutedEventArgs e)
{
}
i am using multiple open files dialog with listbox (see in ref*). so How to listbox value to windows1 in messagebox_button function or any function?
Thanks
Thanks

ramya bharathPosted Jun 5, 2015, 5:18 AM
Mainwindow main =AApplication. current as MainWindow;
main.listbox wil be the listbox you wanted to access.
Else if the mainwindow is nit the current window then befire closing the window trigger eventof MainWindow. before closing to save the value of listbox to some other public element and use it