Benjamin Jones
Benjamin Jones

Reputation: 997

WPF VB.net Close Page

A event in MainWIndow.xaml.vb opens Page1.xaml. I have a button on Page1. How can I close Page1 by click the button on Page1 to close just Page1.xaml and NOT the main Window (MainWindow.xaml)???

Upvotes: 0

Views: 1475

Answers (1)

Lars H
Lars H

Reputation: 57

In the Button_Click Event in Page1 You just write:

Me.Close()

This will Close only Page1

Upvotes: 2

Related Questions