How often is a UserControl handle recreated?

Viewed 1003

I looked up the UserControl.Load event for winforms (found here) on msdn and saw this caution message:

The Load event occurs when the handle for the UserControl is created. In some circumstances, this can cause the Load event to occur more than one time. For example, the Load event occurs when the UserControl is loaded, and again if the handle is recreated. (One way that a handle is recreated is by calling the RecreateHandle method.) To account for the Load event occurring more than one time, you should put any one time initialization code in the UserControl constructor instead of a Load event handler. In addition, you should not add data bindings to the UserControl in a Load event handler.

My question is then, what besides an explicit call to RecreateHandle will cause the handle to be recreated for a UserControl? Before reading this, I've always put anything that should only happen once in the Load event. Also (from the last sentence), where is the best place to add data bindings? Does it really matter if I'm not going to call RecreateHandle?

1 Answers
Related