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"
|
|
|
|
xmlns:vm="clr-namespace:Wox.ViewModel;assembly=Wox"
|
|
|
|
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"
|
|
|
|
Icon="Images/app.png"
|
|
|
|
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"
|
|
|
|
Deactivated="OnDeactivated"
|
|
|
|
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-04-28 08:35:33 +08:00
|
|
|
Margin="24,24,24,8"
|
2020-06-02 03:35:37 +08:00
|
|
|
BorderThickness="0"
|
|
|
|
CornerRadius="4"
|
|
|
|
Background="{DynamicResource SystemChromeLow}"
|
|
|
|
BorderBrush="{DynamicResource SystemChromeLow}">
|
2020-04-21 10:53:20 +08:00
|
|
|
<Border.Effect>
|
2020-06-02 03:35:37 +08:00
|
|
|
<DropShadowEffect BlurRadius="12" Opacity="0.3" ShadowDepth="0" />
|
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-04-28 08:35:33 +08:00
|
|
|
Margin="24,8,24,24"
|
2020-06-02 03:35:37 +08:00
|
|
|
BorderThickness="0"
|
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}"
|
|
|
|
BorderBrush="{DynamicResource SystemChromeLow}">
|
|
|
|
<!--<Border.RenderTransform>
|
|
|
|
<TranslateTransform />
|
|
|
|
</Border.RenderTransform>-->
|
2020-04-21 10:53:20 +08:00
|
|
|
<Border.Effect>
|
2020-06-02 03:35:37 +08:00
|
|
|
<DropShadowEffect BlurRadius="12" Opacity="0.3" ShadowDepth="0" />
|
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-04-09 02:32:59 +08:00
|
|
|
</Window.InputBindings>
|
|
|
|
</Window>
|