Skip to content

Commit f3882fb

Browse files
authored
Feature: Added support for Listary integration (#15069)
1 parent 8b9b6bf commit f3882fb

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

src/Files.App/UserControls/AddressToolbar.xaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,18 @@
217217
<ColumnDefinition Width="Auto" />
218218
</Grid.ColumnDefinitions>
219219

220+
<!-- Listary Integration -->
221+
<Grid Width="0" Height="0">
222+
<!-- Contains the current path -->
223+
<TextBox AutomationProperties.AutomationId="CurrentPathGet" Text="{x:Bind ViewModel.PathControlDisplayText, Mode=OneWay}" />
224+
225+
<!-- Modifies the current path -->
226+
<TextBox
227+
x:Name="CurrentPathSetTextBox"
228+
AutomationProperties.AutomationId="CurrentPathSet"
229+
TextChanged="{x:Bind ViewModel.CurrentPathSetTextBox_TextChanged, Mode=OneWay}" />
230+
</Grid>
231+
220232
<!-- Page Navigation Actions -->
221233
<StackPanel
222234
Grid.Row="1"

src/Files.App/ViewModels/UserControls/AddressToolbarViewModel.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,12 @@ public void PathboxItemFlyout_Opened(object sender, object e)
483483
ToolbarFlyoutOpened?.Invoke(this, new ToolbarFlyoutOpenedEventArgs() { OpenedFlyout = (MenuFlyout)sender });
484484
}
485485

486+
public void CurrentPathSetTextBox_TextChanged(object sender, TextChangedEventArgs args)
487+
{
488+
if (sender is TextBox textBox)
489+
PathBoxQuerySubmitted?.Invoke(this, new ToolbarQuerySubmittedEventArgs() { QueryText = textBox.Text });
490+
}
491+
486492
public void VisiblePath_TextChanged(AutoSuggestBox sender, AutoSuggestBoxTextChangedEventArgs args)
487493
{
488494
if (args.Reason == AutoSuggestionBoxTextChangeReason.UserInput)

0 commit comments

Comments
 (0)