packages/Windows API Code Pack 1.1/source/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowser.WPF.xaml.cs
/// <summary>
/// To avoid the 'Dispatcher processing has been suspended' InvalidOperationException on Win7,
/// the ExplorerBorwser native control is initialized after this control is fully loaded.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
To avoid the 'Dispatcher processing has been suspended' InvalidOperationException on Win7,
the ExplorerBorwser native control is initialized after this control is fully loaded.
To avoid the ' Dispatcher processing has been suspended ' InvalidOperationException on Win7 the ExplorerBorwser native control is initialized after this control is fully loaded .
void ExplorerBrowser_Loaded(object sender, RoutedEventArgs e)
        {
            dtCLRUpdater.Tick += new EventHandler(UpdateDependencyPropertiesFromCLRPRoperties);
            dtCLRUpdater.Interval = new TimeSpan(100 * 10000); 
            dtCLRUpdater.Start();
            if (initialNavigationTarget != null)
            {
                ExplorerBrowserControl.Navigate(initialNavigationTarget);
                initialNavigationTarget = null;
            }
            if (initialViewMode != null)
            {
                ExplorerBrowserControl.ContentOptions.ViewMode = (ExplorerBrowserViewMode)initialViewMode;
                initialViewMode = null;
            }
        }
void ExplorerBrowser_Loaded ( object sender , RoutedEventArgs e ) { dtCLRUpdater . Tick += new EventHandler ( UpdateDependencyPropertiesFromCLRPRoperties ) ; dtCLRUpdater . Interval = new TimeSpan ( 100 * 10000 ) ; dtCLRUpdater . Start ( ) ; if ( initialNavigationTarget != null ) { ExplorerBrowserControl . Navigate ( initialNavigationTarget ) ; initialNavigationTarget = null ; } if ( initialViewMode != null ) { ExplorerBrowserControl . ContentOptions . ViewMode = ( ExplorerBrowserViewMode ) initialViewMode ; initialViewMode = null ; } }
To avoid the 'Dispatcher processing has been suspended' InvalidOperationException on Win7,
the ExplorerBorwser native control is initialized after this control is fully loaded.
To avoid the ' Dispatcher processing has been suspended ' InvalidOperationException on Win7 the ExplorerBorwser native control is initialized after this control is fully loaded .
// setup timer to update dependency properties from CLR properties of WinForms ExplorerBrowser object // 100ms
sender
object
None
e
RoutedEventArgs
None