@@ -82,6 +82,7 @@ public sealed partial class NavigationToolbarViewModel : ObservableObject, IAddr
82
82
83
83
public bool IsSingleItemOverride { get ; set ; }
84
84
85
+ [ Obsolete ( "Superseded by Omnibar." ) ]
85
86
public bool SearchHasFocus { get ; private set ; }
86
87
87
88
public bool EnableOmnibar => GeneralSettingsService . EnableOmnibar ;
@@ -93,6 +94,7 @@ public sealed partial class NavigationToolbarViewModel : ObservableObject, IAddr
93
94
94
95
private NavigationToolbar ? AddressToolbar => ( MainWindow . Instance . Content as Frame ) ? . FindDescendant < NavigationToolbar > ( ) ;
95
96
97
+ [ Obsolete ( "Superseded by Omnibar." ) ]
96
98
public SearchBoxViewModel SearchBoxViewModel => ( SearchBoxViewModel ) SearchBox ;
97
99
98
100
public bool HasAdditionalAction =>
@@ -186,15 +188,19 @@ public sealed partial class NavigationToolbarViewModel : ObservableObject, IAddr
186
188
public bool CanRefresh { get => _CanRefresh ; set => SetProperty ( ref _CanRefresh , value ) ; }
187
189
188
190
private string _SearchButtonGlyph = "\uE721 " ;
191
+ [ Obsolete ( "Superseded by Omnibar." ) ]
189
192
public string SearchButtonGlyph { get => _SearchButtonGlyph ; set => SetProperty ( ref _SearchButtonGlyph , value ) ; }
190
193
191
194
private bool _ManualEntryBoxLoaded ;
195
+ [ Obsolete ( "Superseded by Omnibar." ) ]
192
196
public bool ManualEntryBoxLoaded { get => _ManualEntryBoxLoaded ; set => SetProperty ( ref _ManualEntryBoxLoaded , value ) ; }
193
197
194
198
private bool _ClickablePathLoaded = true ;
199
+ [ Obsolete ( "Superseded by Omnibar." ) ]
195
200
public bool ClickablePathLoaded { get => _ClickablePathLoaded ; set => SetProperty ( ref _ClickablePathLoaded , value ) ; }
196
201
197
202
private string _PathControlDisplayText ;
203
+ [ Obsolete ( "Superseded by Omnibar." ) ]
198
204
public string PathControlDisplayText { get => _PathControlDisplayText ; set => SetProperty ( ref _PathControlDisplayText , value ) ; }
199
205
200
206
private bool _HasItem = false ;
@@ -207,6 +213,7 @@ public sealed partial class NavigationToolbarViewModel : ObservableObject, IAddr
207
213
public ISearchBoxViewModel SearchBox { get => _SearchBox ; set => SetProperty ( ref _SearchBox , value ) ; }
208
214
209
215
private bool _IsSearchBoxVisible ;
216
+ [ Obsolete ( "Superseded by Omnibar." ) ]
210
217
public bool IsSearchBoxVisible
211
218
{
212
219
get => _IsSearchBoxVisible ;
@@ -236,11 +243,7 @@ public string? PathText
236
243
public string ? OmnibarSearchModeText { get => _OmnibarSearchModeText ; set => SetProperty ( ref _OmnibarSearchModeText , value ) ; }
237
244
238
245
private string _OmnibarCurrentSelectedModeName = OmnibarPathModeName ;
239
- public string OmnibarCurrentSelectedModeName
240
- {
241
- get => _OmnibarCurrentSelectedModeName ;
242
- set => SetProperty ( ref _OmnibarCurrentSelectedModeName , value ) ;
243
- }
246
+ public string OmnibarCurrentSelectedModeName { get => _OmnibarCurrentSelectedModeName ; set => SetProperty ( ref _OmnibarCurrentSelectedModeName , value ) ; }
244
247
245
248
private CurrentInstanceViewModel _InstanceViewModel ;
246
249
public CurrentInstanceViewModel InstanceViewModel
@@ -259,7 +262,7 @@ public CurrentInstanceViewModel InstanceViewModel
259
262
}
260
263
}
261
264
262
- [ Obsolete ( "Remove once Omnibar goes out of experimental ." ) ]
265
+ [ Obsolete ( "Superseded by Omnibar." ) ]
263
266
public bool IsEditModeEnabled
264
267
{
265
268
get => ManualEntryBoxLoaded ;
@@ -411,6 +414,7 @@ private void UserSettingsService_OnSettingChangedEvent(object? sender, SettingCh
411
414
}
412
415
}
413
416
417
+ [ Obsolete ( "Superseded by Omnibar." ) ]
414
418
public void PathBoxItem_DragLeave ( object sender , DragEventArgs e )
415
419
{
416
420
if ( ( ( FrameworkElement ) sender ) . DataContext is not PathBoxItem pathBoxItem ||
@@ -426,6 +430,7 @@ public void PathBoxItem_DragLeave(object sender, DragEventArgs e)
426
430
_dragOverPath = null ;
427
431
}
428
432
433
+ [ Obsolete ( "Superseded by Omnibar." ) ]
429
434
public async Task PathBoxItem_Drop ( object sender , DragEventArgs e )
430
435
{
431
436
if ( _lockFlag )
@@ -464,6 +469,7 @@ public async Task PathBoxItem_Drop(object sender, DragEventArgs e)
464
469
_lockFlag = false ;
465
470
}
466
471
472
+ [ Obsolete ( "Superseded by Omnibar." ) ]
467
473
public async Task PathBoxItem_DragOver ( object sender , DragEventArgs e )
468
474
{
469
475
if ( IsSingleItemOverride ||
@@ -540,6 +546,7 @@ x.Item is ZipStorageFile ||
540
546
deferral . Complete ( ) ;
541
547
}
542
548
549
+ [ Obsolete ( "Superseded by Omnibar." ) ]
543
550
public void PathItemSeparator_DataContextChanged ( FrameworkElement sender , DataContextChangedEventArgs args )
544
551
{
545
552
var pathSeparatorIcon = sender as FontIcon ;
@@ -553,35 +560,41 @@ public void PathItemSeparator_DataContextChanged(FrameworkElement sender, DataCo
553
560
} ) ;
554
561
}
555
562
563
+ [ Obsolete ( "Superseded by Omnibar." ) ]
556
564
public void PathboxItemFlyout_Opening ( object sender , object e )
557
565
{
558
566
ToolbarFlyoutOpening ? . Invoke ( this , new ToolbarFlyoutOpeningEventArgs ( ( MenuFlyout ) sender ) ) ;
559
567
}
560
568
569
+ [ Obsolete ( "Superseded by Omnibar." ) ]
561
570
public void PathBoxItemFlyout_Closed ( object sender , object e )
562
571
{
563
572
( ( MenuFlyout ) sender ) . Items . Clear ( ) ;
564
573
}
565
574
575
+ [ Obsolete ( "Superseded by Omnibar." ) ]
566
576
public void CurrentPathSetTextBox_TextChanged ( object sender , TextChangedEventArgs args )
567
577
{
568
578
if ( sender is TextBox textBox )
569
579
PathBoxQuerySubmitted ? . Invoke ( this , new ToolbarQuerySubmittedEventArgs ( ) { QueryText = textBox . Text } ) ;
570
580
}
571
581
582
+ [ Obsolete ( "Superseded by Omnibar." ) ]
572
583
public void VisiblePath_TextChanged ( AutoSuggestBox sender , AutoSuggestBoxTextChangedEventArgs args )
573
584
{
574
585
if ( args . Reason == AutoSuggestionBoxTextChangeReason . UserInput )
575
586
AddressBarTextEntered ? . Invoke ( this , new AddressBarTextEnteredEventArgs ( ) { AddressBarTextField = sender } ) ;
576
587
}
577
588
589
+ [ Obsolete ( "Superseded by Omnibar." ) ]
578
590
public void VisiblePath_QuerySubmitted ( AutoSuggestBox sender , AutoSuggestBoxQuerySubmittedEventArgs args )
579
591
{
580
592
PathBoxQuerySubmitted ? . Invoke ( this , new ToolbarQuerySubmittedEventArgs ( ) { QueryText = args . QueryText } ) ;
581
593
582
594
( this as IAddressToolbarViewModel ) . IsEditModeEnabled = false ;
583
595
}
584
596
597
+ [ Obsolete ( "Superseded by Omnibar." ) ]
585
598
public void PathBoxItem_PointerPressed ( object sender , PointerRoutedEventArgs e )
586
599
{
587
600
if ( e . Pointer . PointerDeviceType != Microsoft . UI . Input . PointerDeviceType . Mouse )
@@ -710,6 +723,7 @@ await DialogDisplayHelper.ShowDialogAsync(Strings.InvalidItemDialogTitle.GetLoca
710
723
PathControlDisplayText = ContentPageContext . ShellPage . ShellViewModel . WorkingDirectory ;
711
724
}
712
725
726
+ [ Obsolete ( "Superseded by Omnibar." ) ]
713
727
public void PathBoxItem_PreviewKeyDown ( object sender , KeyRoutedEventArgs e )
714
728
{
715
729
switch ( e . Key )
@@ -794,6 +808,7 @@ public void UpdateAdditionalActions()
794
808
OnPropertyChanged ( nameof ( HasAdditionalAction ) ) ;
795
809
}
796
810
811
+ [ Obsolete ( "Superseded by Omnibar." ) ]
797
812
private void CloseSearchBox ( bool doFocus = false )
798
813
{
799
814
if ( _SearchBox . WasQuerySubmitted )
@@ -818,11 +833,13 @@ private void CloseSearchBox(bool doFocus = false)
818
833
}
819
834
}
820
835
836
+ [ Obsolete ( "Superseded by Omnibar." ) ]
821
837
public void SearchRegion_GotFocus ( object sender , RoutedEventArgs e )
822
838
{
823
839
SearchHasFocus = true ;
824
840
}
825
841
842
+ [ Obsolete ( "Superseded by Omnibar." ) ]
826
843
public void SearchRegion_LostFocus ( object sender , RoutedEventArgs e )
827
844
{
828
845
var element = Microsoft . UI . Xaml . Input . FocusManager . GetFocusedElement ( ) ;
@@ -833,6 +850,7 @@ public void SearchRegion_LostFocus(object sender, RoutedEventArgs e)
833
850
CloseSearchBox ( ) ;
834
851
}
835
852
853
+ [ Obsolete ( "Superseded by Omnibar." ) ]
836
854
private void SearchRegion_Escaped ( object ? sender , ISearchBoxViewModel _SearchBox )
837
855
=> CloseSearchBox ( true ) ;
838
856
@@ -912,7 +930,7 @@ private static string NormalizePathInput(string currentInput, bool isFtp)
912
930
return currentInput ;
913
931
}
914
932
915
- [ Obsolete ( "Remove once Omnibar goes out of experimental ." ) ]
933
+ [ Obsolete ( "Superseded by Omnibar." ) ]
916
934
public async Task CheckPathInputAsync ( string currentInput , string currentSelectedPath , IShellPage shellPage )
917
935
{
918
936
if ( currentInput . StartsWith ( '>' ) )
@@ -1153,7 +1171,7 @@ void AddNoResultsItem()
1153
1171
}
1154
1172
}
1155
1173
1156
- public void PopulateOmnibarSuggestionsForCommandPaletteMode ( )
1174
+ public async Task PopulateOmnibarSuggestionsForCommandPaletteMode ( )
1157
1175
{
1158
1176
var newSuggestions = new List < NavigationBarSuggestionItem > ( ) ;
1159
1177
@@ -1194,22 +1212,27 @@ public void PopulateOmnibarSuggestionsForCommandPaletteMode()
1194
1212
}
1195
1213
}
1196
1214
1197
- var suggestionItems = Commands
1198
- . Where ( command => command . IsExecutable
1199
- && command . IsAccessibleGlobally
1200
- && ( command . Description . Contains ( OmnibarCommandPaletteModeText , StringComparison . OrdinalIgnoreCase )
1201
- || command . Code . ToString ( ) . Contains ( OmnibarCommandPaletteModeText , StringComparison . OrdinalIgnoreCase ) ) )
1202
- . Select ( command => new NavigationBarSuggestionItem
1203
- {
1204
- ThemedIconStyle = command . Glyph . ToThemedIconStyle ( ) ,
1205
- Glyph = command . Glyph . BaseGlyph ,
1206
- Text = command . Description ,
1207
- PrimaryDisplay = command . Description ,
1208
- HotKeys = command . HotKeys ,
1209
- SearchText = OmnibarCommandPaletteModeText ,
1210
- } )
1211
- . Where ( item => item . Text != Commands . OpenCommandPalette . Description . ToString ( )
1212
- && item . Text != Commands . EditPath . Description . ToString ( ) ) ;
1215
+ IEnumerable < NavigationBarSuggestionItem > suggestionItems = null ! ;
1216
+
1217
+ await Task . Run ( ( ) =>
1218
+ {
1219
+ suggestionItems = Commands
1220
+ . Where ( command => command . IsExecutable
1221
+ && command . IsAccessibleGlobally
1222
+ && ( command . Description . Contains ( OmnibarCommandPaletteModeText , StringComparison . OrdinalIgnoreCase )
1223
+ || command . Code . ToString ( ) . Contains ( OmnibarCommandPaletteModeText , StringComparison . OrdinalIgnoreCase ) ) )
1224
+ . Select ( command => new NavigationBarSuggestionItem
1225
+ {
1226
+ ThemedIconStyle = command . Glyph . ToThemedIconStyle ( ) ,
1227
+ Glyph = command . Glyph . BaseGlyph ,
1228
+ Text = command . Description ,
1229
+ PrimaryDisplay = command . Description ,
1230
+ HotKeys = command . HotKeys ,
1231
+ SearchText = OmnibarCommandPaletteModeText ,
1232
+ } )
1233
+ . Where ( item => item . Text != Commands . OpenCommandPalette . Description . ToString ( )
1234
+ && item . Text != Commands . EditPath . Description . ToString ( ) ) ;
1235
+ } ) ;
1213
1236
1214
1237
newSuggestions . AddRange ( suggestionItems ) ;
1215
1238
@@ -1297,8 +1320,7 @@ public async Task PopulateOmnibarSuggestionsForSearchMode()
1297
1320
OmnibarSearchModeSuggestionItems . Add ( item ) ;
1298
1321
}
1299
1322
1300
-
1301
- [ Obsolete ( "Remove once Omnibar goes out of experimental." ) ]
1323
+ [ Obsolete ( "Superseded by Omnibar." ) ]
1302
1324
public async Task SetAddressBarSuggestionsAsync ( AutoSuggestBox sender , IShellPage shellpage )
1303
1325
{
1304
1326
if ( sender . Text is not null && shellpage . ShellViewModel is not null )
0 commit comments