Adnan

Adnan

  • NA
  • 24
  • 2.6k

Listbox passing value to other window

Jun 5 2015 3:17 AM
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();
}

<Button Click="btnOpenFiles_Click">Open files</Button>
<Button  Click="Next_Click" Content="NextWindow"/>
<ListBox Name="lbFiles" />
 
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)
{
 
<Button Content="Back"   Click="Back_Button"/>
<Button Content="Message Box"  Click="MessageBox_Button"/> 
 
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

Answers (1)