2020-04-09 02:32:59 +08:00
|
|
|
<Window x:Class="PowerLauncher.MainWindow"
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
2020-07-21 02:22:03 +08:00
|
|
|
xmlns:vm="clr-namespace:PowerLauncher.ViewModel"
|
2020-04-09 02:32:59 +08:00
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
2020-05-13 06:42:21 +08:00
|
|
|
xmlns:local="clr-namespace:PowerLauncher"
|
2020-06-02 03:35:37 +08:00
|
|
|
mc:Ignorable="d"
|
|
|
|
Title="PowerToys Run"
|
2020-04-09 02:32:59 +08:00
|
|
|
Topmost="True"
|
|
|
|
SizeToContent="Height"
|
|
|
|
ResizeMode="NoResize"
|
|
|
|
WindowStyle="None"
|
|
|
|
WindowStartupLocation="Manual"
|
|
|
|
AllowDrop="True"
|
|
|
|
ShowInTaskbar="False"
|
2020-07-14 13:59:19 +08:00
|
|
|
Icon="Images/app.dark.png"
|
2020-04-09 02:32:59 +08:00
|
|
|
AllowsTransparency="True"
|
|
|
|
Loaded="OnLoaded"
|
|
|
|
Closing="OnClosing"
|
2020-06-02 03:35:37 +08:00
|
|
|
Background="Transparent"
|
2020-04-09 02:32:59 +08:00
|
|
|
LocationChanged="OnLocationChanged"
|
2020-07-15 08:54:21 +08:00
|
|
|
Activated="OnActivated"
|
2020-04-09 02:32:59 +08:00
|
|
|
Deactivated="OnDeactivated"
|
2020-06-10 00:16:20 +08:00
|
|
|
IsVisibleChanged="OnVisibilityChanged"
|
2020-04-09 02:32:59 +08:00
|
|
|
Visibility="{Binding MainWindowVisibility, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
d:DataContext="{d:DesignInstance vm:MainViewModel}">
|
2020-06-02 03:35:37 +08:00
|
|
|
<Window.Resources>
|
|
|
|
<CubicEase x:Key="CubicEaseOut" EasingMode="EaseOut"/>
|
|
|
|
|
|
|
|
<!-- Some of the durations are different to give a 'parallax' feel (like start menu has as well) -->
|
|
|
|
<!--<Storyboard x:Key="IntroStoryboard">
|
|
|
|
<DoubleAnimation From="20" To="0" Duration="0:0:0.2" Storyboard.TargetName="SearchBoxBorder" Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.Y)" EasingFunction="{StaticResource CubicEaseOut}"/>
|
|
|
|
<DoubleAnimation From="20" To="0" Duration="0:0:0.250" Storyboard.TargetName="SearchBox" Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.Y)" EasingFunction="{StaticResource CubicEaseOut}"/>
|
|
|
|
<DoubleAnimation From="0.5" To="1" Duration="0:0:0.150" Storyboard.TargetName="SearchBoxBorder" Storyboard.TargetProperty="(UIElement.Opacity)" EasingFunction="{StaticResource CubicEaseOut}"/>
|
|
|
|
<DoubleAnimation From="-10" To="0" Duration="0:0:0.2" Storyboard.TargetName="ListBoxBorder" Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.Y)" EasingFunction="{StaticResource CubicEaseOut}"/>
|
|
|
|
<DoubleAnimation From="0.5" To="1" Duration="0:0:0.1" Storyboard.TargetName="ListBoxBorder" Storyboard.TargetProperty="(UIElement.Opacity)" EasingFunction="{StaticResource CubicEaseOut}"/>
|
|
|
|
</Storyboard>-->
|
|
|
|
|
|
|
|
<!-- Duration is a bit shorter, since it's an outro animation and you want it to be gone asap -->
|
|
|
|
<!--<Storyboard x:Key="OutroStoryboard" Completed="OutroStoryboard_Completed">
|
|
|
|
<DoubleAnimation From="0" To="20" Duration="0:0:0.18" Storyboard.TargetName="SearchBoxBorder" Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.Y)" EasingFunction="{StaticResource CubicEaseOut}"/>
|
|
|
|
<DoubleAnimation From="1" To="0.0" Duration="0:0:0.18" Storyboard.TargetName="SearchBoxBorder" Storyboard.TargetProperty="(UIElement.Opacity)" EasingFunction="{StaticResource CubicEaseOut}"/>
|
|
|
|
<DoubleAnimation From="0" To="-10" Duration="0:0:0.18" Storyboard.TargetName="ListBoxBorder" Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.Y)" EasingFunction="{StaticResource CubicEaseOut}"/>
|
|
|
|
<DoubleAnimation From="1" To="0.0" Duration="0:0:0.18" Storyboard.TargetName="ListBoxBorder" Storyboard.TargetProperty="(UIElement.Opacity)" EasingFunction="{StaticResource CubicEaseOut}"/>
|
|
|
|
</Storyboard>-->
|
|
|
|
|
|
|
|
</Window.Resources>
|
|
|
|
<Grid Width="720"
|
2020-05-02 05:25:06 +08:00
|
|
|
MouseDown="OnMouseDown">
|
2020-04-21 10:53:20 +08:00
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="Auto"/>
|
2020-05-13 06:42:21 +08:00
|
|
|
<RowDefinition Height="*"/>
|
2020-04-21 10:53:20 +08:00
|
|
|
</Grid.RowDefinitions>
|
2020-04-23 06:59:32 +08:00
|
|
|
<Border
|
|
|
|
x:Name="SearchBoxBorder"
|
|
|
|
Grid.Row="0"
|
2020-06-27 07:12:26 +08:00
|
|
|
Margin="24,24,24,24"
|
2020-06-11 02:15:15 +08:00
|
|
|
BorderThickness="1"
|
2020-06-02 03:35:37 +08:00
|
|
|
CornerRadius="4"
|
|
|
|
Background="{DynamicResource SystemChromeLow}"
|
2020-06-11 02:15:15 +08:00
|
|
|
BorderBrush="{DynamicResource BorderBrush}">
|
2020-04-21 10:53:20 +08:00
|
|
|
<Border.Effect>
|
2020-06-27 07:12:26 +08:00
|
|
|
<DropShadowEffect BlurRadius="32" Opacity="0.28" ShadowDepth="1" />
|
2020-04-21 10:53:20 +08:00
|
|
|
</Border.Effect>
|
2020-06-02 03:35:37 +08:00
|
|
|
<local:LauncherControl
|
|
|
|
x:Name="SearchBox">
|
|
|
|
<!--<local:LauncherControl.RenderTransform>
|
|
|
|
<TranslateTransform />
|
|
|
|
</local:LauncherControl.RenderTransform>-->
|
|
|
|
</local:LauncherControl>
|
|
|
|
<!--<Border.RenderTransform>
|
|
|
|
<TranslateTransform />
|
|
|
|
</Border.RenderTransform>-->
|
2020-04-21 10:53:20 +08:00
|
|
|
</Border>
|
2020-04-23 06:59:32 +08:00
|
|
|
<Border
|
|
|
|
x:Name="ListBoxBorder"
|
|
|
|
Grid.Row="1"
|
2020-06-27 07:12:26 +08:00
|
|
|
Margin="24,-8,24,24"
|
2020-06-11 02:15:15 +08:00
|
|
|
BorderThickness="1"
|
2020-04-23 06:59:32 +08:00
|
|
|
CornerRadius="4"
|
2020-06-02 03:35:37 +08:00
|
|
|
Visibility="{Binding Results.Visibility}"
|
|
|
|
Background="{DynamicResource SystemChromeLow}"
|
2020-06-11 02:15:15 +08:00
|
|
|
BorderBrush="{DynamicResource BorderBrush}">
|
2020-06-02 03:35:37 +08:00
|
|
|
<!--<Border.RenderTransform>
|
|
|
|
<TranslateTransform />
|
|
|
|
</Border.RenderTransform>-->
|
2020-04-21 10:53:20 +08:00
|
|
|
<Border.Effect>
|
2020-06-27 07:12:26 +08:00
|
|
|
<DropShadowEffect BlurRadius="32" Opacity="0.28" ShadowDepth="1" />
|
2020-04-21 10:53:20 +08:00
|
|
|
</Border.Effect>
|
2020-06-02 03:35:37 +08:00
|
|
|
<local:ResultList x:Name="ListBox"
|
|
|
|
PreviewMouseDown="ListBox_PreviewMouseDown" >
|
|
|
|
<!--<local:ResultList.RenderTransform>
|
|
|
|
<TranslateTransform />
|
|
|
|
</local:ResultList.RenderTransform>-->
|
|
|
|
</local:ResultList>
|
2020-04-21 10:53:20 +08:00
|
|
|
</Border>
|
|
|
|
</Grid>
|
2020-04-09 02:32:59 +08:00
|
|
|
<Window.InputBindings>
|
2020-04-09 07:53:16 +08:00
|
|
|
<KeyBinding Key="Escape" Command="{Binding EscCommand}" />
|
2020-04-23 06:59:32 +08:00
|
|
|
<KeyBinding Key="Enter" Command="{Binding OpenResultCommand}" />
|
2020-06-09 04:18:42 +08:00
|
|
|
<KeyBinding Modifiers="Alt" Key="F4" Command="{Binding IgnoreCommand}" />
|
2020-04-09 02:32:59 +08:00
|
|
|
</Window.InputBindings>
|
|
|
|
</Window>
|