File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
src/Files.App.Controls/Omnibar Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change 88using Microsoft . UI . Xaml . Shapes ;
99using Microsoft . UI . Xaml . Input ;
1010using Microsoft . UI ;
11+ using CommunityToolkit . WinUI ;
1112
1213namespace Files . App . Controls
1314{
@@ -40,7 +41,7 @@ protected override void OnApplyTemplate()
4041 if ( Modes is null )
4142 return ;
4243
43- // Populate the modes1
44+ // Populate the modes
4445 foreach ( var mode in Modes )
4546 {
4647 // Insert a divider
@@ -66,6 +67,10 @@ protected override void OnApplyTemplate()
6667 mode . Host = _modesHostGrid ;
6768 }
6869
70+ var parentElement = this . FindAscendant < FrameworkElement > ( ) ! ;
71+ parentElement . GettingFocus += ParentElement_GettingFocus ;
72+ parentElement . GotFocus += ParentElement_GotFocus ;
73+ GettingFocus += Omnibar_GettingFocus ;
6974 GotFocus += Omnibar_GotFocus ;
7075 LostFocus += Omnibar_LostFocus ;
7176
@@ -86,6 +91,18 @@ private void UpdateVisualStates()
8691
8792 // Events
8893
94+ private void Omnibar_GettingFocus ( UIElement sender , GettingFocusEventArgs args )
95+ {
96+ }
97+
98+ private void ParentElement_GettingFocus ( UIElement sender , GettingFocusEventArgs args )
99+ {
100+ }
101+
102+ private void ParentElement_GotFocus ( object sender , RoutedEventArgs e )
103+ {
104+ }
105+
89106 private void Omnibar_GotFocus ( object sender , RoutedEventArgs e )
90107 {
91108 _isFocused = true ;
You can’t perform that action at this time.
0 commit comments