Skip to content

Added animated visuals #8402

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 18, 2022
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
20 changes: 15 additions & 5 deletions src/Files/UserControls/NavigationToolbar.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
x:Class="Files.UserControls.NavigationToolbar"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:animatedvisuals="using:Microsoft.UI.Xaml.Controls.AnimatedVisuals"
xmlns:contract8Present="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract,8)"
xmlns:converters="using:Files.Converters"
xmlns:converters1="using:Microsoft.Toolkit.Uwp.UI.Converters"
Expand Down Expand Up @@ -564,33 +565,42 @@

<Button
x:Name="UpdateButton"
x:Load="{x:Bind ViewModel.UpdateSettingsService.IsUpdateAvailable, Mode=OneWay}"
Width="36"
Height="32"
HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch"
x:Load="{x:Bind ViewModel.UpdateSettingsService.IsUpdateAvailable, Mode=OneWay}"
AccessKey="1"
AutomationProperties.Name="{helpers:ResourceString Name=UpdateFiles}"
Background="Transparent"
Command="{x:Bind ViewModel.UpdateCommand, Mode=OneWay}"
IsEnabled="{x:Bind ViewModel.UpdateSettingsService.IsUpdating, Mode=OneWay, Converter={StaticResource BoolNegationConverter}}"
Style="{StaticResource ToolBarButtonStyle}"
ToolTipService.ToolTip="{helpers:ResourceString Name=UpdateFiles}"
HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
ToolTipService.ToolTip="{helpers:ResourceString Name=UpdateFiles}">
<FontIcon FontSize="14" Glyph="&#xE896;" />
</Button>

<Button
x:Name="SettingsButton"
Width="36"
Height="32"
Padding="0"
AccessKey="I"
AutomationProperties.AutomationId="SettingsButton"
AutomationProperties.Name="{helpers:ResourceString Name=NavSettingsButton}"
Background="Transparent"
BorderThickness="0"
Command="{x:Bind SettingsButtonCommand, Mode=OneWay}"
Style="{StaticResource ToolBarButtonStyle}"
ToolTipService.ToolTip="{helpers:ResourceString Name=NavSettingsButton}"
Visibility="{x:Bind ShowSettingsButton, Mode=OneWay}">
<FontIcon FontSize="14" Glyph="&#xE115;" />
<muxc:AnimatedIcon x:Name="SettingAnimatedIcon" Height="16">
<muxc:AnimatedIcon.Source>
<animatedvisuals:AnimatedSettingsVisualSource />
</muxc:AnimatedIcon.Source>
<muxc:AnimatedIcon.FallbackIconSource>
<muxc:SymbolIconSource Symbol="Setting" />
</muxc:AnimatedIcon.FallbackIconSource>
</muxc:AnimatedIcon>
</Button>
</StackPanel>

Expand Down
11 changes: 10 additions & 1 deletion src/Files/UserControls/SearchBox.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
x:Class="Files.UserControls.SearchBox"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:animatedvisuals="using:Microsoft.UI.Xaml.Controls.AnimatedVisuals"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:fs="using:Files.Filesystem"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
d:DesignHeight="300"
d:DesignWidth="400"
mc:Ignorable="d">
Expand Down Expand Up @@ -74,7 +76,14 @@
TextChanged="SearchRegion_TextChanged"
UpdateTextOnSelect="False">
<AutoSuggestBox.QueryIcon>
<FontIcon FontSize="14" Glyph="&#xE094;" />
<muxc:AnimatedIcon x:Name="SearchAnimatedIcon" Height="16">
<muxc:AnimatedIcon.Source>
<animatedvisuals:AnimatedFindVisualSource />
</muxc:AnimatedIcon.Source>
<muxc:AnimatedIcon.FallbackIconSource>
<muxc:SymbolIconSource Symbol="Find" />
</muxc:AnimatedIcon.FallbackIconSource>
</muxc:AnimatedIcon>
</AutoSuggestBox.QueryIcon>
<AutoSuggestBox.KeyboardAccelerators>
<KeyboardAccelerator Key="Escape" Invoked="SearchRegion_Escaped" />
Expand Down