I am unable to close one file,. so switch to close all but this method,.
its not a correct sollution of this problem,. but it solves that,.
i find this code in our Code project
here.
I hope feature also this code has not give problems,..
private void CloseAllWindows()
{
for (int intCounter = App.Current.Windows.Count - 1; intCounter > 0; intCounter--)
App.Current.Windows[intCounter].Close();
}
private void btn1_Click(object sender, RoutedEventArgs e)
{
CloseAllWindows();
Window2 win2 = new Window2();
win2.Show();
}
Thank to all,.