Skip to content

Commit a608986

Browse files
PureWeenmattleibow
andauthored
Update src/Controls/src/Core/Handlers/Shell/ShellItemHandler.Windows.cs
Co-authored-by: Matthew Leibowitz <mattleibow@live.com>
1 parent 2125e1b commit a608986

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Controls/src/Core/Handlers/Shell/ShellItemHandler.Windows.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,13 @@ protected override void DisconnectHandler(FrameworkElement platformView)
8686
if (platformView is MauiNavigationView mnv)
8787
{
8888
mnv.SelectionChanged -= OnNavigationTabChanged;
89-
if (mnv.AutoSuggestBox is not null)
89+
if (mnv.AutoSuggestBox is { } autoSuggestBox)
9090
{
91-
mnv.AutoSuggestBox.TextChanged -= OnSearchBoxTextChanged;
92-
mnv.AutoSuggestBox.QuerySubmitted -= OnSearchBoxQuerySubmitted;
93-
mnv.AutoSuggestBox.SuggestionChosen -= OnSearchBoxSuggestionChosen;
94-
mnv.AutoSuggestBox.GotFocus -= OnSearchBoxGotFocus;
95-
mnv.AutoSuggestBox.LostFocus -= OnSearchBoxLostFocus;
91+
autoSuggestBox.TextChanged -= OnSearchBoxTextChanged;
92+
autoSuggestBox.QuerySubmitted -= OnSearchBoxQuerySubmitted;
93+
autoSuggestBox.SuggestionChosen -= OnSearchBoxSuggestionChosen;
94+
autoSuggestBox.GotFocus -= OnSearchBoxGotFocus;
95+
autoSuggestBox.LostFocus -= OnSearchBoxLostFocus;
9696
}
9797
}
9898

0 commit comments

Comments
 (0)