File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,6 +72,8 @@ public static void Exit ()
7272 /// <param name="mainForm">A Form that represents the form to make visible.</param>
7373 public static void Run ( Form mainForm )
7474 {
75+ AvaloniaSynchronizationContext . InstallIfNeeded ( ) ;
76+
7577 mainForm . Show ( ) ;
7678 Run ( ( ICloseable ) mainForm ) ;
7779 }
@@ -85,6 +87,7 @@ public static void Run (ICloseable closable)
8587 if ( _mainLoopCancellationTokenSource != null )
8688 throw new InvalidOperationException ( "Run should only be called once" ) ;
8789
90+ AvaloniaSynchronizationContext . InstallIfNeeded ( ) ;
8891 closable . Closed += ( s , e ) => Exit ( ) ;
8992
9093 _mainLoopCancellationTokenSource = new CancellationTokenSource ( ) ;
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ public async Task<DialogResult> ShowDialog (Form owner)
2525 Title = Title
2626 } ;
2727
28- var result = await parent . OpenFolderPickerAsync ( options ) . ConfigureAwait ( false ) ;
28+ var result = await parent . OpenFolderPickerAsync ( options ) ;
2929
3030 var paths = result . Select ( f => f . GetFullPath ( ) ) . WhereNotNull ( ) ;
3131
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ public async Task<DialogResult> ShowDialog (Form owner)
2626 FileTypeFilter = filters
2727 } ;
2828
29- var result = await parent . OpenFilePickerAsync ( options ) . ConfigureAwait ( false ) ;
29+ var result = await parent . OpenFilePickerAsync ( options ) ;
3030
3131 FileNames . Clear ( ) ;
3232
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ public async Task<DialogResult> ShowDialog (Form owner)
2727 FileTypeChoices = filters
2828 } ;
2929
30- var result = await parent . SaveFilePickerAsync ( options ) . ConfigureAwait ( false ) ;
30+ var result = await parent . SaveFilePickerAsync ( options ) ;
3131
3232 FileNames . Clear ( ) ;
3333
You can’t perform that action at this time.
0 commit comments