File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
src/Files.App.Controls/Omnibar Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -132,12 +132,15 @@ protected void ChangeMode(OmnibarMode? oldMode, OmnibarMode newMode)
132132 if ( oldMode is not null )
133133 VisualStateManager . GoToState ( oldMode , "Unfocused" , true ) ;
134134
135- // Reset
136- foreach ( var column in _modesHostGrid . ColumnDefinitions )
137- column . Width = GridLength . Auto ;
135+ DispatcherQueue . TryEnqueue ( ( ) =>
136+ {
137+ // Reset
138+ foreach ( var column in _modesHostGrid . ColumnDefinitions )
139+ column . Width = GridLength . Auto ;
138140
139- // Expand the given mode
140- _modesHostGrid . ColumnDefinitions [ index ] . Width = new ( 1 , GridUnitType . Star ) ;
141+ // Expand the given mode
142+ _modesHostGrid . ColumnDefinitions [ index ] . Width = new ( 1 , GridUnitType . Star ) ;
143+ } ) ;
141144
142145 var itemCount = Modes . Count ;
143146 var itemIndex = Modes . IndexOf ( newMode ) ;
You can’t perform that action at this time.
0 commit comments