Skip to content

Commit f7fc6d3

Browse files
authored
Feature: Added support for starting tag search from the Details Pane (#14544)
1 parent 5ff7f98 commit f7fc6d3

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/Files.App/UserControls/Pane/InfoPane.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@
315315
AutomationProperties.Name="{x:Bind AsTag.Tag.Name, Mode=OneWay}"
316316
Orientation="Horizontal"
317317
Spacing="8"
318+
Tapped="TagItem_Tapped"
318319
ToolTipService.ToolTip="{x:Bind AsTag.Tag.Name, Mode=OneWay}">
319320
<!-- Tag icon -->
320321
<PathIcon

src/Files.App/UserControls/Pane/InfoPane.xaml.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ public sealed partial class InfoPane : UserControl
2222

2323
private readonly ICommandManager Commands;
2424

25+
private IContentPageContext contentPageContext { get; } = Ioc.Default.GetRequiredService<IContentPageContext>();
26+
2527
public InfoPaneViewModel ViewModel { get; private set; }
2628

2729
private ObservableContext Context { get; } = new();
@@ -83,5 +85,14 @@ public bool IsHorizontal
8385
set => SetProperty(ref isHorizontal, value);
8486
}
8587
}
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+
}
8697
}
8798
}

0 commit comments

Comments
 (0)