Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How Do You Rename A Windows Presentation Foundation (WPF) Application?

0
Posted

How Do You Rename A Windows Presentation Foundation (WPF) Application?

0

In the current version of Microsoft Visual Studio, it is a manual operation to change the name of a Windows Presentation Foundation ( WPF ) Application. At first glance, it appears that all you need to do is rename it by right-clicking on the XAML file in Visual Studio and selecting Rename. After you enter a new name and press enter, the .XAML file and the associated code behind .vb files are saved with a new name. However, you will find that when you try to run your application, it will crash. Open Microsoft Visual Studio and start a new standard Windows Presentation Foundation application. By default the main window has a boring name of “Window1”. Right-click on Window1.xaml and choose Rename from the context menu. Type a more meaningful name such as MyKillerApp and press enter. Notice the Window1.xaml and Window1.xaml.vb are renamed to MyKillerApp.xaml and MyKillerApp.xaml.vb. Double click the Application.xaml file. The StartupUri is still pointing to Window1.xaml. Change it to MyKi

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123