Is there a way to make a reset button . that restarts my program from the beginning
I used a button with the commands that is equal to Window_Loaded but i have converted some labels to int32
and if i reuse them the program shuts down completly.
i used
labelX.Content = string.Empty;
Loading
Kirtan PatelPosted Dec 6, 2009, 4:37 PM
In windows Application we have Option . Application.Restart(); but in WPF there is Some difference .
if my answer helps you then please check "do you like this answer" check box :)
Here is Code To Restart the Application in WPF .
using System.Diagnostics;
private void button1_Click(object sender, RoutedEventArgs e)
{
//Code to Restart WPF Application
//Start New Application Before Closing Current
Process.Start(Application.ResourceAssembly.Location);
//Close the Current
Application.Current.Shutdown();
}