question

Asier-9635 avatar image
0 Votes"
Asier-9635 asked PeterFleischer-3316 edited

How can I change the name of the start-up form without altering the system configuration

Dear,

I have a solution in visual studio made with wpf and .net. When I change the name of 'mainwindow.xaml' I can't run the program.

I have tried right click on change name instead of changing the name manually it even like this does not make the necessary changes for the execution of the application to be successful. How can I change correctly the name of the wpf window?

thanks

windows-wpf
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

PeterFleischer-3316 avatar image
0 Votes"
PeterFleischer-3316 answered PeterFleischer-3316 edited

Hi,
set StartupUri in App.xaml (C#) or Application.xaml (VB):

 <Application x:Class="WpfApp1.App"
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:local="clr-namespace:WpfApp1"
              StartupUri="Window075.xaml"/>
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.