Search code examples
c#.netxamlsilverlight-4.0childwindow

How i can close ChildWindow in silverlight from page?


I have page.xaml and childwindow. How i can close the childwindow from page.xaml. Example by click on button in page.xaml. How i can get this childWindow from code?


Solution

  • Name your ChildWindow example x:Name="myChildWindow" under your page.xaml button click event in your code behind put this

    myChildWindow.Close();