initializecomponent

Excluding FxCop rule in source.

Hi, In a project I'm working on FxCop shows me lots of (and I mean more than 400) errors on the InitializeComponent() methods generated by the Windows Forms designer. Most of those errors are just the assignment of the Text property of labels. I'd like to suppress those methods in source, so I copied the suppression code generated by F...

How to provide custom code for InitializeComponent?

When you modify column headers of a ListView at design time, the designer generates code to serialize column headers at run-time: private void InitializeComponent() { this.listView1 = new System.Windows.Forms.ListView(); this.columnHeader1 = new System.Windows.Forms.ColumnHeader(); this.columnHeader2 = new System.Windows.For...

Form.OnResize triggered during InitializeComponent()

I have the same UI code running on my XP English machine and on XP Japanese machine. For some reason - the behavior is different between those two machines: On the Japanese machine the OnResize event is getting triggered during the InitializeComponent call (I think that from ResumeLayout function). On the English machine it doesn't. I ...

WPF C#: Starting crash due to client 'Region and Language' settings

Hi, I'm working on a WPF C# application, and it seems to crash with a few random people. So eventually I found out it was the 'Region and Language' settings that was responsible. For example, if I were to set my Format to English (United States) it will work, if I set it to Swedish (Sweden) it will crash from the start. When I test th...