Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 33 additions & 34 deletions src/Files.App/UserControls/NavigationToolbar.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -267,13 +267,13 @@
x:Name="Back"
AccessKey="B"
AccessKeyInvoked="Button_AccessKeyInvoked"
AutomationProperties.FullDescription="{x:Bind ViewModel.Commands.NavigateBack.Description, Mode=OneWay}"
AutomationProperties.Name="{x:Bind ViewModel.Commands.NavigateBack.Label, Mode=OneWay}"
Command="{x:Bind ViewModel.Commands.NavigateBack, Mode=OneWay}"
IsEnabled="{x:Bind ViewModel.Commands.NavigateBack.IsExecutable, Mode=OneWay}"
AutomationProperties.FullDescription="{x:Bind Commands.NavigateBack.Description, Mode=OneWay}"
AutomationProperties.Name="{x:Bind Commands.NavigateBack.Label, Mode=OneWay}"
Command="{x:Bind Commands.NavigateBack, Mode=OneWay}"
IsEnabled="{x:Bind Commands.NavigateBack.IsExecutable, Mode=OneWay}"
Style="{StaticResource AddressToolbarButtonStyle}"
ToolTipService.ToolTip="{x:Bind ViewModel.Commands.NavigateBack.LabelWithHotKey, Mode=OneWay}">
<FontIcon FontSize="14" Glyph="{x:Bind ViewModel.Commands.NavigateBack.Glyph.BaseGlyph, Mode=OneWay}" />
ToolTipService.ToolTip="{x:Bind Commands.NavigateBack.LabelWithHotKey, Mode=OneWay}">
<FontIcon FontSize="14" Glyph="{x:Bind Commands.NavigateBack.Glyph.BaseGlyph, Mode=OneTime}" />
<Button.ContextFlyout>
<MenuFlyout
x:Name="BackHistoryFlyout"
Expand All @@ -297,13 +297,13 @@
x:Name="Forward"
AccessKey="F"
AccessKeyInvoked="Button_AccessKeyInvoked"
AutomationProperties.FullDescription="{x:Bind ViewModel.Commands.NavigateForward.Description, Mode=OneWay}"
AutomationProperties.Name="{x:Bind ViewModel.Commands.NavigateForward.Label, Mode=OneWay}"
Command="{x:Bind ViewModel.Commands.NavigateForward, Mode=OneWay}"
IsEnabled="{x:Bind ViewModel.Commands.NavigateForward.IsExecutable, Mode=OneWay}"
AutomationProperties.FullDescription="{x:Bind Commands.NavigateForward.Description, Mode=OneWay}"
AutomationProperties.Name="{x:Bind Commands.NavigateForward.Label, Mode=OneWay}"
Command="{x:Bind Commands.NavigateForward, Mode=OneWay}"
IsEnabled="{x:Bind Commands.NavigateForward.IsExecutable, Mode=OneWay}"
Style="{StaticResource AddressToolbarButtonStyle}"
ToolTipService.ToolTip="{x:Bind ViewModel.Commands.NavigateForward.LabelWithHotKey, Mode=OneWay}">
<FontIcon FontSize="14" Glyph="{x:Bind ViewModel.Commands.NavigateForward.Glyph.BaseGlyph, Mode=OneWay}" />
ToolTipService.ToolTip="{x:Bind Commands.NavigateForward.LabelWithHotKey, Mode=OneWay}">
<FontIcon FontSize="14" Glyph="{x:Bind Commands.NavigateForward.Glyph.BaseGlyph, Mode=OneTime}" />
<Button.ContextFlyout>
<MenuFlyout
x:Name="ForwardHistoryFlyout"
Expand All @@ -327,38 +327,38 @@
x:Name="Up"
AccessKey="U"
AccessKeyInvoked="Button_AccessKeyInvoked"
AutomationProperties.FullDescription="{x:Bind ViewModel.Commands.NavigateUp.Description, Mode=OneWay}"
AutomationProperties.Name="{x:Bind ViewModel.Commands.NavigateUp.Label, Mode=OneWay}"
Command="{x:Bind ViewModel.Commands.NavigateUp, Mode=OneWay}"
IsEnabled="{x:Bind ViewModel.Commands.NavigateUp.IsExecutable, Mode=OneWay}"
AutomationProperties.FullDescription="{x:Bind Commands.NavigateUp.Description, Mode=OneWay}"
AutomationProperties.Name="{x:Bind Commands.NavigateUp.Label, Mode=OneWay}"
Command="{x:Bind Commands.NavigateUp, Mode=OneWay}"
IsEnabled="{x:Bind Commands.NavigateUp.IsExecutable, Mode=OneWay}"
Style="{StaticResource AddressToolbarButtonStyle}"
ToolTipService.ToolTip="{x:Bind ViewModel.Commands.NavigateUp.LabelWithHotKey, Mode=OneWay}">
<FontIcon FontSize="14" Glyph="{x:Bind ViewModel.Commands.NavigateUp.Glyph.BaseGlyph, Mode=OneWay}" />
ToolTipService.ToolTip="{x:Bind Commands.NavigateUp.LabelWithHotKey, Mode=OneWay}">
<FontIcon FontSize="14" Glyph="{x:Bind Commands.NavigateUp.Glyph.BaseGlyph, Mode=OneTime}" />
</Button>

<Button
x:Name="Refresh"
AccessKey="R"
AccessKeyInvoked="Button_AccessKeyInvoked"
AutomationProperties.Name="{x:Bind Commands.RefreshItems.Label}"
AutomationProperties.Name="{x:Bind Commands.RefreshItems.Label, Mode=OneWay}"
Command="{x:Bind Commands.RefreshItems, Mode=OneWay}"
IsEnabled="{x:Bind Commands.RefreshItems.IsExecutable, Mode=OneWay}"
Style="{StaticResource AddressToolbarButtonStyle}"
ToolTipService.ToolTip="{x:Bind Commands.RefreshItems.LabelWithHotKey, Mode=OneWay}">
<FontIcon FontSize="14" Glyph="{x:Bind Commands.RefreshItems.Glyph.BaseGlyph}" />
<FontIcon FontSize="14" Glyph="{x:Bind Commands.RefreshItems.Glyph.BaseGlyph, Mode=OneTime}" />
</Button>

<Button
x:Name="HomeButton"
x:Load="{x:Bind ViewModel.ShowHomeButton, Mode=OneWay}"
AccessKey="H"
AccessKeyInvoked="Button_AccessKeyInvoked"
AutomationProperties.Name="{x:Bind Commands.NavigateHome.Label}"
AutomationProperties.Name="{x:Bind Commands.NavigateHome.Label, Mode=OneWay}"
Command="{x:Bind Commands.NavigateHome, Mode=OneWay}"
IsEnabled="{x:Bind Commands.NavigateHome.IsExecutable, Mode=OneWay}"
Style="{StaticResource AddressToolbarButtonStyle}"
ToolTipService.ToolTip="{x:Bind Commands.NavigateHome.LabelWithHotKey, Mode=OneWay}">
<FontIcon FontSize="14" Glyph="{x:Bind Commands.NavigateHome.Glyph.BaseGlyph}" />
<FontIcon FontSize="14" Glyph="{x:Bind Commands.NavigateHome.Glyph.BaseGlyph, Mode=OneTime}" />
</Button>
</StackPanel>

Expand Down Expand Up @@ -478,13 +478,13 @@
x:Name="ShowSearchButton"
AccessKey="I"
AccessKeyInvoked="Button_AccessKeyInvoked"
AutomationProperties.Name="{x:Bind ViewModel.Commands.Search.Label}"
Command="{x:Bind ViewModel.Commands.Search, Mode=OneWay}"
IsEnabled="{x:Bind ViewModel.Commands.Search.IsExecutable}"
AutomationProperties.Name="{x:Bind Commands.Search.Label, Mode=OneWay}"
Command="{x:Bind Commands.Search, Mode=OneWay}"
IsEnabled="{x:Bind Commands.Search.IsExecutable, Mode=OneWay}"
Style="{StaticResource AddressToolbarButtonStyle}"
ToolTipService.ToolTip="{x:Bind ViewModel.Commands.Search.LabelWithHotKey, Mode=OneWay}"
ToolTipService.ToolTip="{x:Bind Commands.Search.LabelWithHotKey, Mode=OneWay}"
Visibility="Collapsed">
<FontIcon FontSize="14" Glyph="{x:Bind ViewModel.SearchButtonGlyph, Mode=OneWay}" />
<FontIcon FontSize="14" Glyph="{x:Bind ViewModel.SearchButtonGlyph, Mode=OneTime}" />
</Button>

<!-- Shelf Pane -->
Expand All @@ -495,11 +495,11 @@
Padding="0"
x:Load="{x:Bind ViewModel.ShowShelfPaneToggleButton, Mode=OneWay}"
AccessKeyInvoked="Button_AccessKeyInvoked"
AutomationProperties.Name="{x:Bind ViewModel.Commands.ToggleShelfPane.Label}"
AutomationProperties.Name="{x:Bind Commands.ToggleShelfPane.Label, Mode=OneWay}"
Background="Transparent"
BorderBrush="Transparent"
IsChecked="{x:Bind Commands.ToggleShelfPane.IsOn, Mode=TwoWay}"
ToolTipService.ToolTip="{x:Bind ViewModel.Commands.ToggleShelfPane.LabelWithHotKey, Mode=OneWay}">
ToolTipService.ToolTip="{x:Bind Commands.ToggleShelfPane.LabelWithHotKey, Mode=OneWay}">
<controls:ThemedIcon
Width="16"
Height="16"
Expand Down Expand Up @@ -609,17 +609,16 @@
x:Load="{x:Bind ViewModel.IsAppUpdated, Mode=OneWay}"
AccessKey="2"
AccessKeyInvoked="Button_AccessKeyInvoked"
AutomationProperties.Name="{x:Bind ViewModel.Commands.OpenReleaseNotes.Label}"
Command="{x:Bind ViewModel.Commands.OpenReleaseNotes, Mode=OneWay}"
AutomationProperties.Name="{x:Bind Commands.OpenReleaseNotes.Label, Mode=OneWay}"
Command="{x:Bind Commands.OpenReleaseNotes, Mode=OneWay}"
Style="{StaticResource AddressToolbarButtonStyle}"
ToolTipService.ToolTip="{x:Bind ViewModel.Commands.OpenReleaseNotes.LabelWithHotKey}"
Visibility="{x:Bind ViewModel.Commands.OpenReleaseNotes.IsExecutable, Mode=OneWay}">
ToolTipService.ToolTip="{x:Bind Commands.OpenReleaseNotes.LabelWithHotKey, Mode=OneWay}"
Visibility="{x:Bind Commands.OpenReleaseNotes.IsExecutable, Mode=OneWay}">
<controls:ThemedIcon
Width="16"
Height="16"
Style="{StaticResource App.ThemedIcons.AppUpdatedBox}" />
</Button>

</StackPanel>

<!-- Status Center TeachingTip -->
Expand Down
6 changes: 3 additions & 3 deletions src/Files.App/UserControls/Pane/InfoPane.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@
x:Name="PreviewErrorText"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{x:Bind GetLocalizedResource('NoItemSelected')}"
Text="{helpers:ResourceString Name=NoItemSelected}"
TextWrapping="WrapWholeWords" />
<ContentPresenter
x:Name="PreviewControlPresenter"
Expand Down Expand Up @@ -505,7 +505,7 @@
</VisualState.StateTriggers>
<VisualState.Setters>
<Setter Target="PreviewErrorText.Visibility" Value="Visible" />
<Setter Target="PreviewErrorText.Text" Value="{x:Bind GetLocalizedResource('DetailsPanePreviewNotAvaliableText')}" />
<Setter Target="PreviewErrorText.Text" Value="{helpers:ResourceString Name=DetailsPanePreviewNotAvaliableText}" />
<Setter Target="FileDetailsRepeater.Visibility" Value="Visible" />
<Setter Target="DetailsTagsList.Visibility" Value="Visible" />
<Setter Target="DetailsOpenProperties.Visibility" Value="Visible" />
Expand All @@ -519,7 +519,7 @@
</VisualState.StateTriggers>
<VisualState.Setters>
<Setter Target="PreviewErrorText.Visibility" Value="Visible" />
<Setter Target="PreviewErrorText.Text" Value="{x:Bind GetLocalizedResource('DetailsPanePreviewNotAvaliableText')}" />
<Setter Target="PreviewErrorText.Text" Value="{helpers:ResourceString Name=DetailsPanePreviewNotAvaliableText}" />
<Setter Target="FileDetailsRepeater.Visibility" Value="Collapsed" />
<Setter Target="DetailsTagsList.Visibility" Value="Collapsed" />
<Setter Target="DetailsOpenProperties.Visibility" Value="Collapsed" />
Expand Down
2 changes: 0 additions & 2 deletions src/Files.App/UserControls/Pane/InfoPane.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ public void UpdatePosition(double panelWidth, double panelHeight)
}
}

private string GetLocalizedResource(string resName) => resName.GetLocalizedResource();

private void Root_Unloaded(object sender, RoutedEventArgs e)
{
PreviewControlPresenter.Content = null;
Expand Down
Loading