0

I am a new of VB WPF

Now I have a NavigetionWindow and set a page to be source,

in the page I place a button and I would like to close the whole application by pressing it,

how can I do it?

user2602850
  • 31
  • 2
  • 5

1 Answers1

0

You can call Application.Shutdown() (this is C#), there are restrictions to this call so look at the MSDN link below for those restrictions. http://msdn.microsoft.com/en-us/library/system.windows.application.aspx

TYY
  • 2,702
  • 1
  • 13
  • 14
  • I can't use this. Some partial codes here Class MainWindow Private Sub btExit_Click(sender As Object, e As RoutedEventArgs) Handles btExit.Click Application.ShutDown() End Sub End Class VS say: "Reference to a non-shared member requires an object reference" what should the object be referenced? – user2602850 Oct 10 '13 at 19:23