Skip to content

Commit

Permalink
add dismiss selection command bar shortcut
Browse files Browse the repository at this point in the history
add search box tooltip

update keyboard resources comments
  • Loading branch information
United600 committed Oct 1, 2024
1 parent f18769a commit 268179e
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 83 deletions.
37 changes: 9 additions & 28 deletions Screenbox/Controls/PlaylistView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,31 +86,6 @@
Padding="{x:Bind Padding, Mode=OneWay}"
KeyTipPlacementMode="Bottom"
Orientation="Horizontal">
<!--<ctAnimations:Implicit.ShowAnimations>
<ctAnimations:OpacityAnimation
Delay="{StaticResource ControlFastAnimationAfterDuration}"
EasingMode="EaseOut"
From="0"
To="1"
Duration="{StaticResource ControlFasterAnimationDuration}" />
<ctAnimations:TranslationAnimation
Delay="{StaticResource ControlFastAnimationAfterDuration}"
From="0,16,0"
To="0,0,0"
Duration="{StaticResource ControlFasterAnimationDuration}" />
</ctAnimations:Implicit.ShowAnimations>
<ctAnimations:Implicit.HideAnimations>
<ctAnimations:OpacityAnimation
EasingMode="EaseOut"
From="1"
To="0"
Duration="{StaticResource ControlFastAnimationDuration}" />
<ctAnimations:TranslationAnimation
From="0,0,0"
To="0,-28,0"
Duration="{StaticResource ControlFastAnimationDuration}" />
</ctAnimations:Implicit.HideAnimations>-->

<Button
x:Name="AddFilesButton"
Margin="0,0,12,0"
Expand Down Expand Up @@ -171,19 +146,21 @@
To="1"
Duration="{StaticResource ControlNormalAnimationDuration}" />
<ctAnimations:TranslationAnimation
From="0,28,0"
EasingMode="EaseOut"
From="0,48,0"
To="0,0,0"
Duration="{StaticResource ControlNormalAnimationDuration}" />
</ctAnimations:Implicit.ShowAnimations>
<ctAnimations:Implicit.HideAnimations>
<ctAnimations:OpacityAnimation
EasingMode="EaseOut"
EasingMode="EaseIn"
From="1"
To="0"
Duration="{StaticResource ControlFastAnimationDuration}" />
<ctAnimations:TranslationAnimation
EasingMode="EaseIn"
From="0,0,0"
To="0,-16,0"
To="0,-48,0"
Duration="{StaticResource ControlFastAnimationDuration}" />
</ctAnimations:Implicit.HideAnimations>

Expand Down Expand Up @@ -266,6 +243,7 @@
<Button
Padding="4,5,4,5"
VerticalAlignment="Top"
controls:AcceleratorService.ToolTip="{x:Bind strings:Resources.ClearSelection}"
AutomationProperties.Name="{strings:Resources Key=ClearSelection}"
BorderThickness="0"
Command="{x:Bind ViewModel.ClearSelectionCommand}"
Expand Down Expand Up @@ -307,6 +285,9 @@
</ResourceDictionary.ThemeDictionaries>
</ResourceDictionary>
</Button.Resources>
<Button.KeyboardAccelerators>
<KeyboardAccelerator Key="Escape" ScopeOwner="{x:Bind SelectionCommandBar}" />
</Button.KeyboardAccelerators>
</Button>
</StackPanel>
</CommandBar.Content>
Expand Down
7 changes: 3 additions & 4 deletions Screenbox/Controls/PlaylistView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,12 @@ private void PlaylistView_OnUnloaded(object sender, RoutedEventArgs e)

private void PlaylistListViewSelectAllKeyboardAccelerator_OnInvoked(Windows.UI.Xaml.Input.KeyboardAccelerator sender, Windows.UI.Xaml.Input.KeyboardAcceleratorInvokedEventArgs args)
{
if (MultiSelectToggle.IsEnabled)
if (PlaylistListView.Items.Count > 0)
{
MultiSelectToggle.IsChecked = true;
PlaylistListView.SelectAll();
args.Handled = true;
}

PlaylistListView.SelectAll();
args.Handled = true;
}
}
}
3 changes: 2 additions & 1 deletion Screenbox/Pages/MainPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,10 @@
<muxc:NavigationView.AutoSuggestBox>
<AutoSuggestBox
x:Name="NavViewSearchBox"
controls:AcceleratorService.ToolTip="{x:Bind NavViewSearchBox.PlaceholderText}"
controls:AcceleratorService.ToolTip="{x:Bind NavViewSearchBox.(AutomationProperties.Name)}"
AccessKey="{strings:KeyboardResources Key=NavigationPaneAutoSuggestButtonKey}"
AccessKeyInvoked="NavViewSearchBoxAccessKeyFocus_OnInvoked"
AutomationProperties.Name="{strings:Resources Key=SearchBoxToolTip}"
ItemTemplate="{StaticResource SearchAutoSuggestBoxItemTemplate}"
KeyTipPlacementMode="Right"
PlaceholderText="{strings:Resources Key=SearchBoxPlaceholderText}"
Expand Down
2 changes: 1 addition & 1 deletion Screenbox/Pages/PlayerPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@
Grid.Row="1"
Grid.Column="0"
MinWidth="64"
MaxWidth="320"
MaxWidth="300"
Margin="32,0,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Bottom"
Expand Down
Loading

0 comments on commit 268179e

Please sign in to comment.