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;
Reset button WPF C#
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Kirtan PatelRank #292 · 8.6K reputationPosted Dec 6, 2009, 11:37 AM EST
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();
}