File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
src/Files.App/UserControls/Pane Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 315
315
AutomationProperties.Name=" {x:Bind AsTag.Tag.Name, Mode=OneWay}"
316
316
Orientation=" Horizontal"
317
317
Spacing=" 8"
318
+ Tapped=" TagItem_Tapped"
318
319
ToolTipService.ToolTip=" {x:Bind AsTag.Tag.Name, Mode=OneWay}" >
319
320
<!-- Tag icon -->
320
321
<PathIcon
Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ public sealed partial class InfoPane : UserControl
22
22
23
23
private readonly ICommandManager Commands ;
24
24
25
+ private IContentPageContext contentPageContext { get ; } = Ioc . Default . GetRequiredService < IContentPageContext > ( ) ;
26
+
25
27
public InfoPaneViewModel ViewModel { get ; private set ; }
26
28
27
29
private ObservableContext Context { get ; } = new ( ) ;
@@ -83,5 +85,14 @@ public bool IsHorizontal
83
85
set => SetProperty ( ref isHorizontal , value ) ;
84
86
}
85
87
}
88
+
89
+ private void TagItem_Tapped ( object sender , TappedRoutedEventArgs e )
90
+ {
91
+ var tagName = ( ( sender as StackPanel ) ? . Children [ 1 ] as TextBlock ) ? . Text ;
92
+ if ( tagName is null )
93
+ return ;
94
+
95
+ contentPageContext . ShellPage ? . SubmitSearch ( $ "tag:{ tagName } ") ;
96
+ }
86
97
}
87
98
}
You can’t perform that action at this time.
0 commit comments