I’ve created some UserControl. Here is its constructor:
public ZoomableChart()
{
InitializeComponent();
this.mainChart = new MainChart();
this.mainChart.Loaded += new RoutedEventHandler(delegate(object sender, RoutedEventArgs e)
{
this.zoomChart = new ZoomChart();
});
}
I don’t want to exit from it until mainChart.Loaded event handler execute. Is there any way to do it?
You can create
AutoResetEventand wait for it.