-1

In a Visual Studio C# WPF Application I want to be able to set the window title with code because I want to be able to change the version number in the code.

DavidShefcik
  • 45
  • 2
  • 7

3 Answers3

0

public partial class MainWindow : Window {

//public 
public MainWindow()
{
    InitializeComponent();


    Title = "MY APP v1.0";
}

}

Adil
  • 124
  • 7
0

For example

xaml <Window x:Class="Temp.MainWindow" ... Title="Contacts"> </Window>

You can change it with using:

cs this.Title="your title"

0

From main window you can change title by

    this.Title = "New Title";
vivek kv
  • 406
  • 6
  • 11