private void OnControlLoaded(
object sender,
RoutedEventArgs e
)
{
Utilities.Trace(this);
if (!m_loaded)
{
HookChildElements(this.Children);
if (m_bands.Count > 0 && m_mainBand != null)
{
// we are in silverlight mode, so all bands and urls are specified in
// xaml and we can start data load immediately
m_isJavascriptMode = false;
m_notifier = new DataControlNotifier(m_dataUrls, m_bands);
m_notifier.LoadComplete += OnControlAndDataComlete;
m_notifier.Start();
m_notifier.CheckCompleted();
}
else
{
// we will need to wait till Run method is called from javascript
m_isJavascriptMode = true;
m_notifier = new DataControlNotifier();
m_notifier.LoadComplete += OnControlAndDataComlete;
}
m_loaded = true;
}
// Do not remove copyright notice
AddCopyrightElement();
}