I have a main window in Which I have a button. When i click that button i want to show a dialog box which i have made using a page. I am using
Page1 P = new Page(); //Page which i want to show over my main window
this.P.Visibility = Visibility.Visible;
when i used Window to make dialog box it is working fine but with pages there is no Show property associated. Does anyone know Of any method to display page over Mainwindow.
A
Pagecannot be shown as a window. For this you need to useWindow, both can host the same XAML content, you just need to use the right container!See this question:
Page vs Window in WPF?