Jump to content
Software FX Community

ISupportInitialize and the adding of dynamically created chart to container


ltang

Recommended Posts

It seems that from version 0.8.2994.29059, the code below will raise unhandle exception:

Chart element = new Chart();

container.Children.Add(element);

 

What I found that to make the code above work, BeginInit is required:

 

Chart element = new Chart();

try

{

element.BeginInit()

container.Children.Add(element);

}

finally

{

 element.EndInit();

Question: does ISupportInitialize become a pattern for adding dynamically created chart to container from now on?

 

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...