Databind a dataContext on another Xaml window?
In my main window.xaml i have a button which opens searchwindow.xaml
private void Search_Click(object sender, RoutedEventArgs e)
{
if (dt.Rows.Count > 0)
{
new SearchWindow(){DataContext = dt.DefaultView}.Show();
}
}
In the searchWindow.Xaml is there is button 'BIND' and a datagrid . I want to databind the data grid with the dat context table that has been sent from MainWindow.xaml on clicking the BIND button...How can i do it...Thank you