Skip to content

Commit

Permalink
Feature: Added support for Listary integration (#15069)
Browse files Browse the repository at this point in the history
  • Loading branch information
yaira2 committed Mar 31, 2024
1 parent 8b9b6bf commit f3882fb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Files.App/UserControls/AddressToolbar.xaml
Expand Up @@ -217,6 +217,18 @@
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>

<!-- Listary Integration -->
<Grid Width="0" Height="0">
<!-- Contains the current path -->
<TextBox AutomationProperties.AutomationId="CurrentPathGet" Text="{x:Bind ViewModel.PathControlDisplayText, Mode=OneWay}" />

<!-- Modifies the current path -->
<TextBox
x:Name="CurrentPathSetTextBox"
AutomationProperties.AutomationId="CurrentPathSet"
TextChanged="{x:Bind ViewModel.CurrentPathSetTextBox_TextChanged, Mode=OneWay}" />
</Grid>

<!-- Page Navigation Actions -->
<StackPanel
Grid.Row="1"
Expand Down
Expand Up @@ -483,6 +483,12 @@ public void PathboxItemFlyout_Opened(object sender, object e)
ToolbarFlyoutOpened?.Invoke(this, new ToolbarFlyoutOpenedEventArgs() { OpenedFlyout = (MenuFlyout)sender });
}

public void CurrentPathSetTextBox_TextChanged(object sender, TextChangedEventArgs args)
{
if (sender is TextBox textBox)
PathBoxQuerySubmitted?.Invoke(this, new ToolbarQuerySubmittedEventArgs() { QueryText = textBox.Text });
}

public void VisiblePath_TextChanged(AutoSuggestBox sender, AutoSuggestBoxTextChangedEventArgs args)
{
if (args.Reason == AutoSuggestionBoxTextChangeReason.UserInput)
Expand Down

0 comments on commit f3882fb

Please sign in to comment.