mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-21 15:27:55 +08:00
c85cd4ac24
* Moved all files from Wox to Powerlauncher * Removed Wox project * Changed namespace for imported files * Resolved errors for VM * Added build dependency order * Fixed errors in helper class * Remove Wox files * Fixed errors in SingleInstance class * Fixed wox.tests * Fixed MSI * Removed obsolete methods from PublicAPI * nit fixes * Throw null exception * Fix merge conflict
105 lines
5.9 KiB
XML
105 lines
5.9 KiB
XML
<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:PowerLauncher.ViewModel"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:local="clr-namespace:PowerLauncher"
|
|
mc:Ignorable="d"
|
|
Title="PowerToys Run"
|
|
Topmost="True"
|
|
SizeToContent="Height"
|
|
ResizeMode="NoResize"
|
|
WindowStyle="None"
|
|
WindowStartupLocation="Manual"
|
|
AllowDrop="True"
|
|
ShowInTaskbar="False"
|
|
Icon="Images/app.dark.png"
|
|
AllowsTransparency="True"
|
|
Loaded="OnLoaded"
|
|
Closing="OnClosing"
|
|
Background="Transparent"
|
|
LocationChanged="OnLocationChanged"
|
|
Activated="OnActivated"
|
|
Deactivated="OnDeactivated"
|
|
IsVisibleChanged="OnVisibilityChanged"
|
|
Visibility="{Binding MainWindowVisibility, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
d:DataContext="{d:DesignInstance vm:MainViewModel}">
|
|
<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"
|
|
MouseDown="OnMouseDown">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
<Border
|
|
x:Name="SearchBoxBorder"
|
|
Grid.Row="0"
|
|
Margin="24,24,24,24"
|
|
BorderThickness="1"
|
|
CornerRadius="4"
|
|
Background="{DynamicResource SystemChromeLow}"
|
|
BorderBrush="{DynamicResource BorderBrush}">
|
|
<Border.Effect>
|
|
<DropShadowEffect BlurRadius="32" Opacity="0.28" ShadowDepth="1" />
|
|
</Border.Effect>
|
|
<local:LauncherControl
|
|
x:Name="SearchBox">
|
|
<!--<local:LauncherControl.RenderTransform>
|
|
<TranslateTransform />
|
|
</local:LauncherControl.RenderTransform>-->
|
|
</local:LauncherControl>
|
|
<!--<Border.RenderTransform>
|
|
<TranslateTransform />
|
|
</Border.RenderTransform>-->
|
|
</Border>
|
|
<Border
|
|
x:Name="ListBoxBorder"
|
|
Grid.Row="1"
|
|
Margin="24,-8,24,24"
|
|
BorderThickness="1"
|
|
CornerRadius="4"
|
|
Visibility="{Binding Results.Visibility}"
|
|
Background="{DynamicResource SystemChromeLow}"
|
|
BorderBrush="{DynamicResource BorderBrush}">
|
|
<!--<Border.RenderTransform>
|
|
<TranslateTransform />
|
|
</Border.RenderTransform>-->
|
|
<Border.Effect>
|
|
<DropShadowEffect BlurRadius="32" Opacity="0.28" ShadowDepth="1" />
|
|
</Border.Effect>
|
|
<local:ResultList x:Name="ListBox"
|
|
PreviewMouseDown="ListBox_PreviewMouseDown" >
|
|
<!--<local:ResultList.RenderTransform>
|
|
<TranslateTransform />
|
|
</local:ResultList.RenderTransform>-->
|
|
</local:ResultList>
|
|
</Border>
|
|
</Grid>
|
|
<Window.InputBindings>
|
|
<KeyBinding Key="Escape" Command="{Binding EscCommand}" />
|
|
<KeyBinding Key="Enter" Command="{Binding OpenResultCommand}" />
|
|
<KeyBinding Modifiers="Alt" Key="F4" Command="{Binding IgnoreCommand}" />
|
|
</Window.InputBindings>
|
|
</Window>
|