I am currently working on a Windows Form application, and setting the text of labels in the InitializeComponent()
method of MyForm.Designed.cs
. I'm setting it to a function call so it looks like the first line, but it keeps getting reformatted into the second line. The first line works perfectly, it's just that it's getting reformatted.
this.teamGroup.Text = LocalizedLanguage.GetValue("SelectedTeamLabel");
this.teamGroup.Text = "Selected Team";
Additionally, this is also happening for the TabIndex as well.
I have:
Jacob, you shouldn't modify the code inside InitializeComponent manually.
/// <summary>
/// Required method for Designer support - do not modify
/// contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
If you want to add something for the components use the following approach:
public YourForm ()
{
InitializeComponent();
CustomInitializeComponent();
}
private void CustomInitializeComponent()
{
teamGroup.Text = LocalizedLanguage.GetValue("SelectedTeamLabel");
}