Merge branch 'dev/PowerLauncher' into dev/traies/merge-powerlauncher

This commit is contained in:
Tomas Raies 2020-04-29 15:28:54 -07:00
commit dceef35aac
5 changed files with 96 additions and 502 deletions

View File

@ -12,23 +12,17 @@
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
<ResourceDictionary.ThemeDictionaries> <ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Light"> <ResourceDictionary x:Key="Light">
<Color x:Key="BackgroundColor">#FFf2f1f2</Color>
<SolidColorBrush x:Key="PrimaryTextColor" Color="Black"/> <SolidColorBrush x:Key="PrimaryTextColor" Color="Black"/>
<SolidColorBrush x:Key="SystemChromeLow" Color="{ThemeResource SystemChromeLowColor}" /> <SolidColorBrush x:Key="SystemChromeLow" Color="{StaticResource BackgroundColor}" />
<AcrylicBrush x:Key="BackdropAcrylicBrush" BackgroundSource="Backdrop" TintColor="White" TintOpacity="0.9" FallbackColor="White"/> <AcrylicBrush x:Key="BackdropAcrylicBrush" BackgroundSource="Backdrop" TintColor="{StaticResource BackgroundColor}" TintOpacity="0.9" FallbackColor="{StaticResource BackgroundColor}"/>
<AcrylicBrush x:Key="KeyboardShortcutAcrylicBrush" BackgroundSource="Backdrop" TintColor="White" TintOpacity="0.9" FallbackColor="White"/>
<SolidColorBrush x:Key="ItemBackgroundColor" Color="#FFFFFFFF"/>
<Color x:Key="DropShadowColor">#FF979797</Color>
<x:Double x:Key="DropShadowBlurRadius">8</x:Double>
</ResourceDictionary> </ResourceDictionary>
<ResourceDictionary x:Key="Default"> <ResourceDictionary x:Key="Default">
<SolidColorBrush x:Key="PrimaryTextColor" Color="White"/> <SolidColorBrush x:Key="PrimaryTextColor" Color="White"/>
<SolidColorBrush x:Key="SystemChromeLow" Color="{ThemeResource SystemChromeLowColor}" /> <Color x:Key="BackgroundColor">#FF484848</Color>
<AcrylicBrush x:Key="BackdropAcrylicBrush" BackgroundSource="Backdrop" TintColor="#88484848" TintOpacity="0.9" FallbackColor="#FF484848"/> <SolidColorBrush x:Key="SystemChromeLow" Color="{ThemeResource BackgroundColor}" />
<AcrylicBrush x:Key="KeyboardShortcutAcrylicBrush" BackgroundSource="Backdrop" TintColor="Black" TintOpacity="0.9" FallbackColor="Black"/> <AcrylicBrush x:Key="BackdropAcrylicBrush" BackgroundSource="Backdrop" TintColor="{StaticResource BackgroundColor}" TintOpacity="0.9" FallbackColor="{StaticResource BackgroundColor}"/>
<SolidColorBrush x:Key="ItemBackgroundColor" Color="#FFFFFFFF"/>
<x:Double x:Key="DropShadowBlurRadius">8</x:Double>
<Color x:Key="DropShadowColor">#FF979797</Color>
</ResourceDictionary> </ResourceDictionary>
</ResourceDictionary.ThemeDictionaries> </ResourceDictionary.ThemeDictionaries>
@ -42,7 +36,7 @@
<Style x:Key="IconOnlyButton" TargetType="Button"> <Style x:Key="IconOnlyButton" TargetType="Button">
<Setter Property="Background" Value="{ThemeResource ButtonRevealBackground}" /> <Setter Property="Background" Value="{ThemeResource ButtonRevealBackground}" />
<Setter Property="Foreground" Value="{ThemeResource PrimaryTextColor}" /> <!--<Setter Property="Foreground" Value="{ThemeResource PrimaryTextColor}" />-->
<!--<Setter Property="BorderBrush" Value="0" />--> <!--<Setter Property="BorderBrush" Value="0" />-->
<Setter Property="BorderThickness" Value="{ThemeResource ButtonRevealBorderThemeThickness}" /> <Setter Property="BorderThickness" Value="{ThemeResource ButtonRevealBorderThemeThickness}" />
<Setter Property="Padding" Value="{ThemeResource ButtonPadding}" /> <Setter Property="Padding" Value="{ThemeResource ButtonPadding}" />
@ -112,195 +106,6 @@
</Setter.Value> </Setter.Value>
</Setter> </Setter>
</Style> </Style>
<Style TargetType="GridViewItem" x:Key="DropShadowGridViewItemRevealStyle">
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
<Setter Property="Background" Value="Transparent" />
<!--<Setter Property="Background" Value="{ThemeResource GridViewItemRevealBackground}" />-->
<Setter Property="BorderThickness" Value="{ThemeResource GridViewItemRevealBorderThemeThickness}" />
<Setter Property="BorderBrush" Value="{ThemeResource GridViewItemRevealBorderBrush}" />
<Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
<Setter Property="Foreground" Value="{ThemeResource GridViewItemForeground}" />
<Setter Property="TabNavigation" Value="Local" />
<Setter Property="IsHoldingEnabled" Value="True" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Margin" Value="0,0,4,4" />
<Setter Property="MinWidth" Value="{ThemeResource GridViewItemMinWidth}" />
<Setter Property="MinHeight" Value="{ThemeResource GridViewItemMinHeight}" />
<Setter Property="AllowDrop" Value="False" />
<Setter Property="UseSystemFocusVisuals" Value="True" />
<Setter Property="FocusVisualMargin" Value="-2" />
<Setter Property="FocusVisualPrimaryBrush" Value="{ThemeResource GridViewItemFocusVisualPrimaryBrush}" />
<Setter Property="FocusVisualPrimaryThickness" Value="2" />
<Setter Property="FocusVisualSecondaryBrush" Value="{ThemeResource GridViewItemFocusVisualSecondaryBrush}" />
<Setter Property="FocusVisualSecondaryThickness" Value="1" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="GridViewItem">
<Grid x:Name="RootGrid" Width="120" Background="{ThemeResource GridViewItemRevealBackground}">
<!--<Interactivity:Interaction.Behaviors>
<Core:EventTriggerBehavior EventName="PointerEntered">
<Core:CallMethodAction TargetObject="{Binding ElementName=GridScaleUp}" MethodName="StartAnimation"/>
</Core:EventTriggerBehavior>
<Core:EventTriggerBehavior EventName="PointerExited">
<Core:CallMethodAction TargetObject="{Binding ElementName=GridScaleDown}" MethodName="StartAnimation"/>
</Core:EventTriggerBehavior>
</Interactivity:Interaction.Behaviors>-->
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualStateGroup.Transitions>
<VisualTransition From="PointerOver" To="Normal" GeneratedDuration="0:0:0">
<Storyboard>
<DoubleAnimationUsingKeyFrames EnableDependentAnimation="True" Storyboard.TargetName="DropShadowHolder" Storyboard.TargetProperty="(DropShadowPanel.ShadowOpacity)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0.8">
<EasingDoubleKeyFrame.EasingFunction>
<CubicEase EasingMode="EaseIn"/>
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
<EasingDoubleKeyFrame KeyTime="00:00:0.6" Value="0.2">
<EasingDoubleKeyFrame.EasingFunction>
<CubicEase EasingMode="EaseOut"/>
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames EnableDependentAnimation="True" Storyboard.TargetName="DropShadowHolder" Storyboard.TargetProperty="(DropShadowPanel.BlurRadius)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="{StaticResource DropShadowBlurRadiusOnHover}">
<EasingDoubleKeyFrame.EasingFunction>
<CubicEase EasingMode="EaseIn"/>
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
<EasingDoubleKeyFrame KeyTime="00:00:0.6" Value="{StaticResource DropShadowBlurRadius}">
<EasingDoubleKeyFrame.EasingFunction>
<CubicEase EasingMode="EaseOut"/>
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</VisualTransition>
</VisualStateGroup.Transitions>
<VisualState x:Name="Normal"/>
<VisualState x:Name="Selected">
<VisualState.Setters>
<Setter Target="ContentPresenter.BorderThickness" Value="2" />
<Setter Target="ContentPresenter.BorderBrush" Value="{StaticResource PrimaryTextColor}" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="PointerOver">
<VisualState.Setters>
<Setter Target="RootGrid.(RevealBrush.State)" Value="PointerOver" />
<Setter Target="RootGrid.Background" Value="{ThemeResource ListViewItemRevealBackground}" />
<!--<Setter Target="ContentPresenter.BorderBrush" Value="{ThemeResource GridViewItemRevealBackgroundPointerOver}"/>-->
<!--<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource GridViewItemRevealForegroundPointerOver}" />-->
</VisualState.Setters>
<Storyboard>
<DoubleAnimationUsingKeyFrames EnableDependentAnimation="True" Storyboard.TargetName="DropShadowHolder" Storyboard.TargetProperty="(DropShadowPanel.ShadowOpacity)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0.2">
<EasingDoubleKeyFrame.EasingFunction>
<CubicEase EasingMode="EaseIn"/>
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
<EasingDoubleKeyFrame KeyTime="00:00:0.6" Value="0.8">
<EasingDoubleKeyFrame.EasingFunction>
<CubicEase EasingMode="EaseOut"/>
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames EnableDependentAnimation="True" Storyboard.TargetName="DropShadowHolder" Storyboard.TargetProperty="(DropShadowPanel.BlurRadius)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="{StaticResource DropShadowBlurRadius}">
<EasingDoubleKeyFrame.EasingFunction>
<CubicEase EasingMode="EaseIn"/>
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
<EasingDoubleKeyFrame KeyTime="00:00:0.6" Value="{StaticResource DropShadowBlurRadiusOnHover}">
<EasingDoubleKeyFrame.EasingFunction>
<CubicEase EasingMode="EaseOut"/>
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="PointerOverSelected">
<VisualState.Setters>
<Setter Target="RootGrid.(RevealBrush.State)" Value="PointerOver" />
<Setter Target="RootGrid.Background" Value="{ThemeResource ListViewItemRevealBackground }" />
<Setter Target="ContentPresenter.BorderThickness" Value="2" />
<Setter Target="ContentPresenter.BorderBrush" Value="{StaticResource PrimaryTextColor}" />
<!--<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource GridViewItemRevealForegroundPointerOver}" />-->
</VisualState.Setters>
</VisualState>
<VisualState x:Name="PointerOverPressed">
<VisualState.Setters>
<Setter Target="RootGrid.(RevealBrush.State)" Value="Pressed" />
<Setter Target="RootGrid.Background" Value="{ThemeResource ListViewItemRevealBackground }" />
<Setter Target="ContentPresenter.BorderBrush" Value="{ThemeResource ListViewItemRevealBackground }" />
<!--<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource GridViewItemForegroundPressed}" />-->
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Pressed">
<VisualState.Setters>
<Setter Target="RootGrid.(RevealBrush.State)" Value="Pressed" />
<Setter Target="RootGrid.Background" Value="{ThemeResource ListViewItemRevealBackground }" />
<Setter Target="ContentPresenter.BorderBrush" Value="{ThemeResource ListViewItemRevealBackground }" />
<!--<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource GridViewItemForegroundPressed}" />-->
</VisualState.Setters>
</VisualState>
<VisualState x:Name="PressedSelected">
<VisualState.Setters>
<Setter Target="RootGrid.(RevealBrush.State)" Value="Pressed" />
<Setter Target="ContentPresenter.BorderThickness" Value="2" />
<Setter Target="ContentPresenter.BorderBrush" Value="{StaticResource PrimaryTextColor}" />
<!--<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource GridViewItemForegroundPressed}" />-->
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="DisabledStates">
<VisualState x:Name="Enabled" />
<VisualState x:Name="Disabled">
<VisualState.Setters>
<Setter Target="Root.RevealBorderThickness" Value="0" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<ToolkitControls:DropShadowPanel x:Name="DropShadowHolder" VerticalAlignment="Stretch" Width="72" Margin="10" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
BlurRadius="{StaticResource DropShadowBlurRadius}"
ShadowOpacity="0.2"
OffsetX="0"
OffsetY="0"
Color="{StaticResource DropShadowColor}">
<ContentPresenter x:Name="ContentPresenter" CornerRadius="4" Width="72"
Background="{StaticResource ItemBackgroundColor}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="2"
Content="{TemplateBinding Content}"
ContentTransitions="{TemplateBinding ContentTransitions}"
ContentTemplate="{TemplateBinding ContentTemplate}"
Padding="{TemplateBinding Padding}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
AutomationProperties.AccessibilityView="Raw" />
</ToolkitControls:DropShadowPanel>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary> </ResourceDictionary>
</Application.Resources> </Application.Resources>
</xaml:XamlApplication> </xaml:XamlApplication>

View File

@ -15,7 +15,7 @@
<Setter Property="MinWidth" Value="{ThemeResource TextControlThemeMinWidth}" /> <Setter Property="MinWidth" Value="{ThemeResource TextControlThemeMinWidth}" />
<Setter Property="MinHeight" Value="{ThemeResource TextControlThemeMinHeight}" /> <Setter Property="MinHeight" Value="{ThemeResource TextControlThemeMinHeight}" />
<Setter Property="Foreground" Value="{ThemeResource TextControlForeground}" /> <Setter Property="Foreground" Value="{ThemeResource TextControlForeground}" />
<Setter Property="Background" Value="{ThemeResource TextControlBackground}" /> <Setter Property="Background" Value="Transparent" />
<Setter Property="BorderBrush" Value="{ThemeResource TextControlBorderBrush}" /> <Setter Property="BorderBrush" Value="{ThemeResource TextControlBorderBrush}" />
<Setter Property="SelectionHighlightColor" Value="{ThemeResource TextControlSelectionHighlightColor}" /> <Setter Property="SelectionHighlightColor" Value="{ThemeResource TextControlSelectionHighlightColor}" />
<Setter Property="BorderThickness" Value="0" /> <Setter Property="BorderThickness" Value="0" />
@ -26,156 +26,15 @@
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden" /> <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden" />
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden" /> <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden" />
<Setter Property="ScrollViewer.IsDeferredScrollingEnabled" Value="False" /> <Setter Property="ScrollViewer.IsDeferredScrollingEnabled" Value="False" />
<Setter Property="Padding" Value="{ThemeResource TextControlThemePadding}" /> <Setter Property="Padding" Value="12,0,0,0" />
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="TextBox"> <ControlTemplate TargetType="TextBox">
<Grid> <Grid>
<Grid.Resources>
<Style x:Name="DeleteButtonStyle" TargetType="Button">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid
x:Name="ButtonLayoutGrid"
BorderBrush="{ThemeResource TextControlButtonBorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Background="{ThemeResource TextControlButtonBackground}">
<VisualStateManager.VisualStateGroups> <VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates"> <VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="PointerOver">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonLayoutGrid" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="Transparent" />
</ObjectAnimationUsingKeyFrames>
<!--<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonLayoutGrid" Storyboard.TargetProperty="BorderBrush">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonBorderBrushPointerOver}" />
</ObjectAnimationUsingKeyFrames>-->
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="GlyphElement" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource PrimaryTextColor}" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Pressed">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonLayoutGrid" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="Transparent" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonLayoutGrid" Storyboard.TargetProperty="BorderBrush">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonBorderBrushPressed}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="GlyphElement" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonForegroundPressed}" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Disabled"> <VisualState x:Name="Disabled">
<Storyboard> <Storyboard>
<DoubleAnimation Storyboard.TargetName="ButtonLayoutGrid"
Storyboard.TargetProperty="Opacity"
To="0"
Duration="0" />
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<TextBlock x:Name="GlyphElement"
Foreground="{ThemeResource TextControlPlaceholderForeground}"
VerticalAlignment="Center"
HorizontalAlignment="Center"
FontStyle="Normal"
FontSize="{ThemeResource AutoSuggestBoxIconFontSize}"
Text="&#xE10A;"
FontFamily="{ThemeResource SymbolThemeFontFamily}"
AutomationProperties.AccessibilityView="Raw" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Name="QueryButtonStyle" TargetType="Button">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<ContentPresenter x:Name="ContentPresenter"
Foreground="{ThemeResource TextControlPlaceholderForeground}"
Background="{ThemeResource TextControlButtonBackground}"
BackgroundSizing="{TemplateBinding BackgroundSizing}"
BorderBrush="{ThemeResource TextControlButtonBorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Content="&#xE721;" FontFamily="Segoe MDL2 Assets"
ContentTemplate="{TemplateBinding ContentTemplate}"
ContentTransitions="{TemplateBinding ContentTransitions}"
FontSize="24"
Padding="{TemplateBinding Padding}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
AutomationProperties.AccessibilityView="Raw">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="PointerOver">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="Transparent" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonBorderBrushPointerOver}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource PrimaryTextColor}" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Pressed">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="Transparent" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonBorderBrushPressed}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonForegroundPressed}" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Disabled">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="ContentPresenter"
Storyboard.TargetProperty="Opacity"
To="0"
Duration="0" />
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</ContentPresenter>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Grid.Resources>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Disabled">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlHeaderForegroundDisabled}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="Background"> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlBackgroundDisabled}" /> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlBackgroundDisabled}" />
</ObjectAnimationUsingKeyFrames> </ObjectAnimationUsingKeyFrames>
@ -191,16 +50,11 @@
</Storyboard> </Storyboard>
</VisualState> </VisualState>
<VisualState x:Name="Normal" /> <VisualState x:Name="Normal" />
<VisualState x:Name="PointerOver"> <VisualState x:Name="PointerOver">
<Storyboard> <Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="BorderBrush"> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="BorderBrush">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlBorderBrushPointerOver}" /> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlBorderBrushPointerOver}" />
</ObjectAnimationUsingKeyFrames> </ObjectAnimationUsingKeyFrames>
<!--<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="#FF2e2e2e" />
</ObjectAnimationUsingKeyFrames>-->
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PlaceholderTextContentPresenter" Storyboard.TargetProperty="Foreground"> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PlaceholderTextContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="#FF7e7e7e" /> <DiscreteObjectKeyFrame KeyTime="0" Value="#FF7e7e7e" />
</ObjectAnimationUsingKeyFrames> </ObjectAnimationUsingKeyFrames>
@ -210,14 +64,7 @@
</Storyboard> </Storyboard>
</VisualState> </VisualState>
<VisualState x:Name="Focused"> <VisualState x:Name="Focused">
<Storyboard> <Storyboard>
<!--<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PlaceholderTextContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="#" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="#FF2e2e2e" />
</ObjectAnimationUsingKeyFrames>-->
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="BorderBrush"> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="BorderBrush">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlBorderBrushFocused}" /> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlBorderBrushFocused}" />
</ObjectAnimationUsingKeyFrames> </ObjectAnimationUsingKeyFrames>
@ -227,62 +74,19 @@
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="RequestedTheme"> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="RequestedTheme">
<DiscreteObjectKeyFrame KeyTime="0" Value="Light" /> <DiscreteObjectKeyFrame KeyTime="0" Value="Light" />
</ObjectAnimationUsingKeyFrames> </ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="QueryButton" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonForeground}" />
</ObjectAnimationUsingKeyFrames>
</Storyboard> </Storyboard>
</VisualState> </VisualState>
</VisualStateGroup> </VisualStateGroup>
<VisualStateGroup x:Name="ButtonStates">
<VisualState x:Name="ButtonVisible">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="DeleteButton" Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<Visibility>Visible</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="ButtonCollapsed" />
</VisualStateGroup>
</VisualStateManager.VisualStateGroups> </VisualStateManager.VisualStateGroups>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Border <Border
x:Name="BorderElement" x:Name="BorderElement"
Grid.Row="1" Grid.Row="1"
Background="{TemplateBinding Background}" Background="Transparent"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
Grid.ColumnSpan="3" Grid.ColumnSpan="3"
Grid.RowSpan="1" /> Grid.RowSpan="1" />
<ContentPresenter
x:Name="HeaderContentPresenter"
x:DeferLoadStrategy="Lazy"
Visibility="Collapsed"
Grid.Row="0"
Foreground="{ThemeResource TextControlHeaderForeground}"
Margin="{ThemeResource AutoSuggestBoxTopHeaderMargin}"
Grid.ColumnSpan="3"
Content="{TemplateBinding Header}"
ContentTemplate="{TemplateBinding HeaderTemplate}"
FontWeight="Normal"
TextWrapping="Wrap" />
<ScrollViewer <ScrollViewer
x:Name="ContentElement" x:Name="ContentElement"
Grid.Row="1" Grid.Row="1"
@ -293,18 +97,18 @@
IsHorizontalRailEnabled="{TemplateBinding ScrollViewer.IsHorizontalRailEnabled}" IsHorizontalRailEnabled="{TemplateBinding ScrollViewer.IsHorizontalRailEnabled}"
IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}" IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}"
IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}" IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}"
Padding="{TemplateBinding Padding}"
IsTabStop="False" IsTabStop="False"
Margin="12,0,0,0" Margin="12,0,0,0"
Padding="{TemplateBinding Padding}"
CornerRadius="4" CornerRadius="4"
VerticalAlignment="Center" VerticalAlignment="Center"
AutomationProperties.AccessibilityView="Raw" AutomationProperties.AccessibilityView="Raw"
ZoomMode="Disabled" /> ZoomMode="Disabled" />
<ContentControl <ContentControl
x:Name="PlaceholderTextContentPresenter" x:Name="PlaceholderTextContentPresenter"
Grid.Row="1" Grid.Row="1"
Opacity="0.6" Opacity="0.6"
Height="42"
Foreground="{ThemeResource TextControlPlaceholderForeground}" Foreground="{ThemeResource TextControlPlaceholderForeground}"
Margin="12,0,0,0" Margin="12,0,0,0"
Padding="{TemplateBinding Padding}" Padding="{TemplateBinding Padding}"
@ -313,38 +117,6 @@
VerticalAlignment="Center" VerticalAlignment="Center"
Content="{TemplateBinding PlaceholderText}" Content="{TemplateBinding PlaceholderText}"
IsHitTestVisible="False" /> IsHitTestVisible="False" />
<Button
x:Name="DeleteButton"
Grid.Row="1"
Style="{StaticResource DeleteButtonStyle}"
BorderThickness="{TemplateBinding BorderThickness}"
IsTabStop="False"
Grid.Column="1"
Visibility="Collapsed" Opacity="0"
FontSize="{TemplateBinding FontSize}"
MinWidth="34"
AutomationProperties.AccessibilityView="Raw"
VerticalAlignment="Stretch" />
<Button
x:Name="QueryButton"
Grid.Row="1"
Style="{StaticResource QueryButtonStyle}"
BorderThickness="{TemplateBinding BorderThickness}"
IsTabStop="False"
Grid.Column="2"
FontSize="{TemplateBinding FontSize}"
MinWidth="34"
Width="{TemplateBinding Height}"
VerticalAlignment="Stretch"
AutomationProperties.AccessibilityView="Raw"/>
<ContentPresenter
x:Name="DescriptionPresenter"
Grid.Row="2"
Grid.ColumnSpan="3"
Content="{TemplateBinding Description}"
x:Load="False"
Foreground="{ThemeResource SystemControlDescriptionTextForegroundBrush}"
AutomationProperties.AccessibilityView="Raw" />
</Grid> </Grid>
</ControlTemplate> </ControlTemplate>
</Setter.Value> </Setter.Value>
@ -352,17 +124,33 @@
</Style> </Style>
</UserControl.Resources> </UserControl.Resources>
<Grid <Grid
x:Name="PowerBar"
Background="{ThemeResource BackdropAcrylicBrush}" Background="{ThemeResource BackdropAcrylicBrush}"
Height="60" Height="60"
VerticalAlignment="Top"> VerticalAlignment="Top">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="64"/>
</Grid.ColumnDefinitions>
<TextBlock
x:Name="AutoCompleteTextBlock"
x:FieldModifier="public"
Opacity="0.6"
Foreground="{ThemeResource TextControlPlaceholderForeground}"
AllowFocusOnInteraction="False"
ScrollViewer.BringIntoViewOnFocusChange="False"
Canvas.ZIndex="0"
Margin="24,0,0,0"
VerticalAlignment="Center"
FontSize="24"
/>
<TextBox <TextBox
x:Name="AutoCompleteTextBox" x:Name="QueryTextBox"
x:FieldModifier="public" x:FieldModifier="public"
Style="{StaticResource CustomAutoSuggestBoxTextBoxStyle}" Style="{StaticResource CustomAutoSuggestBoxTextBoxStyle}"
Height="60" PlaceholderText="Start typing.."
IsReadOnly="True"
AllowFocusOnInteraction="False"
ScrollViewer.BringIntoViewOnFocusChange="False" ScrollViewer.BringIntoViewOnFocusChange="False"
Canvas.ZIndex="0" Canvas.ZIndex="0"
Margin="0" Margin="0"
@ -370,17 +158,13 @@
FontSize="24" FontSize="24"
DesiredCandidateWindowAlignment="BottomEdge" /> DesiredCandidateWindowAlignment="BottomEdge" />
<TextBox <TextBlock
x:Name="TextBox" Grid.Column="1"
x:FieldModifier="public" Text="&#xE721;"
Style="{StaticResource CustomAutoSuggestBoxTextBoxStyle}" FontFamily="Segoe MDL2 Assets"
PlaceholderText="Start typing"
Height="60"
ScrollViewer.BringIntoViewOnFocusChange="False"
Canvas.ZIndex="0"
Margin="0"
VerticalAlignment="Center"
FontSize="24" FontSize="24"
DesiredCandidateWindowAlignment="BottomEdge" /> Foreground="{ThemeResource TextControlPlaceholderForeground}"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Grid> </Grid>
</UserControl> </UserControl>

View File

@ -13,11 +13,40 @@
d:DesignWidth="720"> d:DesignWidth="720">
<UserControl.Resources> <UserControl.Resources>
<converters:BoolToObjectConverter x:Key="BoolToVisibilityConverter" TrueValue="Visible" FalseValue="Collapsed"/> <converters:BoolToObjectConverter x:Key="BoolToVisibilityConverter" TrueValue="Visible" FalseValue="Collapsed"/>
<Style x:Key="CommandButtonGridViewItemContainerStyle" TargetType="GridViewItem">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Margin" Value="0,0,0,0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="GridViewItem">
<ListViewItemPresenter x:Name="Root" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal"/>
<VisualState x:Name="Selected"/>
<VisualState x:Name="PointerOver"/>
<VisualState x:Name="PointerOverSelected"/>
<VisualState x:Name="PointerOverPressed"/>
<VisualState x:Name="Pressed"/>
<VisualState x:Name="PressedSelected"/>
</VisualStateGroup>
<VisualStateGroup x:Name="DisabledStates">
<VisualState x:Name="Enabled"/>
<VisualState x:Name="Disabled"/>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</ListViewItemPresenter>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</UserControl.Resources> </UserControl.Resources>
<Grid <Grid
x:Name="PowerBar" x:Name="PowerBar"
Background="{ThemeResource BackdropAcrylicBrush}" Background="{ThemeResource BackdropAcrylicBrush}"
VerticalAlignment="Top"> VerticalAlignment="Top">
<ListView <ListView
x:Name="SuggestionsList" x:Name="SuggestionsList"
x:FieldModifier="public" x:FieldModifier="public"
@ -30,11 +59,10 @@
ItemsSource="{Binding Results.Results, Mode=OneWay}" ItemsSource="{Binding Results.Results, Mode=OneWay}"
SelectionMode="Single" SelectionMode="Single"
SelectedIndex="{Binding Results.SelectedIndex, Mode=TwoWay}" SelectedIndex="{Binding Results.SelectedIndex, Mode=TwoWay}"
Style="{StaticResource ListViewNoAnimations}" Style="{StaticResource ListViewNoAnimations}">
>
<ListView.ItemTemplate> <ListView.ItemTemplate>
<DataTemplate > <DataTemplate >
<Grid Height="72" Width="690" Background="Transparent" RowSpacing="0"> <Grid Height="72" Width="642" Background="Transparent" RowSpacing="0">
<Interactivity:Interaction.Behaviors> <Interactivity:Interaction.Behaviors>
<Core:EventTriggerBehavior EventName="PointerEntered"> <Core:EventTriggerBehavior EventName="PointerEntered">
<Core:InvokeCommandAction Command="{Binding ActivateContextButtonsHoverCommand}"/> <Core:InvokeCommandAction Command="{Binding ActivateContextButtonsHoverCommand}"/>
@ -46,22 +74,23 @@
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="64" /> <ColumnDefinition Width="64" />
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid.RowDefinitions > <Grid.RowDefinitions >
<RowDefinition Height="*"/> <RowDefinition Height="*"/>
<RowDefinition Height="*"/> <RowDefinition Height="*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Image x:Name="AppIcon" Height="36" Margin="8,0,0,0" Grid.RowSpan="2" HorizontalAlignment="Left" Source="{Binding Image}" /> <Image x:Name="AppIcon" Height="36" MaxWidth="56" Grid.RowSpan="2" Margin="-8,0,0,0" HorizontalAlignment="Center" Source="{Binding Image}" />
<TextBlock x:Name="Title" Grid.Column="1" Text="{Binding Result.Title}" FontWeight="SemiBold" FontSize="20" VerticalAlignment="Bottom"/> <TextBlock x:Name="Title" Grid.Column="1" Text="{Binding Result.Title}" FontWeight="SemiBold" FontSize="20" Margin="0,0,0,-2" VerticalAlignment="Bottom"/>
<TextBlock x:Name="Path" Grid.Column="1" Text= "{Binding Result.SubTitle}" Grid.Row="1" Opacity="0.6" VerticalAlignment="Top"/> <TextBlock x:Name="Path" Grid.Column="1" Text= "{Binding Result.SubTitle}" Grid.Row="1" Opacity="0.6" Margin="0,2,0,0" VerticalAlignment="Top"/>
<GridView <GridView
ItemContainerStyle="{StaticResource CommandButtonGridViewItemContainerStyle}"
HorizontalAlignment="Right" HorizontalAlignment="Right"
VerticalAlignment="Center" VerticalAlignment="Center"
CornerRadius="4" CornerRadius="4"
Grid.RowSpan="2" Grid.RowSpan="2"
Grid.Column="1" Grid.Column="2"
Margin="0,0,42,0" Margin="8,8,0,0"
Height="46"
Visibility="{Binding AreContextButtonsActive, Converter={StaticResource BoolToVisibilityConverter}}" Visibility="{Binding AreContextButtonsActive, Converter={StaticResource BoolToVisibilityConverter}}"
ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled"
ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled"
@ -70,7 +99,7 @@
SelectedIndex="{Binding ContextMenuSelectedIndex}"> SelectedIndex="{Binding ContextMenuSelectedIndex}">
<GridView.ItemTemplate> <GridView.ItemTemplate>
<DataTemplate> <DataTemplate>
<Button Command="{Binding Command}" VerticalAlignment="Center" CornerRadius="4" Height="42" Width="42" BorderThickness="1" Style="{ThemeResource ButtonRevealStyle}"> <Button Command="{Binding Command}" VerticalAlignment="Center" CornerRadius="4" Height="42" Width="42" BorderThickness="1" Style="{ThemeResource IconOnlyButton}">
<ToolTipService.ToolTip> <ToolTipService.ToolTip>
<TextBlock Text="{Binding Title}"/> <TextBlock Text="{Binding Title}"/>
</ToolTipService.ToolTip> </ToolTipService.ToolTip>

View File

@ -33,11 +33,11 @@
<Border <Border
x:Name="SearchBoxBorder" x:Name="SearchBoxBorder"
Grid.Row="0" Grid.Row="0"
Margin="8" Margin="24,24,24,8"
BorderThickness="4" BorderThickness="4"
CornerRadius="4"> CornerRadius="4">
<Border.Effect> <Border.Effect>
<DropShadowEffect BlurRadius="12" Opacity="0.4" ShadowDepth="4" /> <DropShadowEffect BlurRadius="16" Opacity="0.8" ShadowDepth="0" />
</Border.Effect> </Border.Effect>
<xaml:WindowsXamlHost <xaml:WindowsXamlHost
InitialTypeName="PowerLauncher.UI.LauncherControl" InitialTypeName="PowerLauncher.UI.LauncherControl"
@ -46,12 +46,12 @@
<Border <Border
x:Name="ListBoxBorder" x:Name="ListBoxBorder"
Grid.Row="1" Grid.Row="1"
Margin="8" Margin="24,8,24,24"
BorderThickness="4" BorderThickness="4"
CornerRadius="4" CornerRadius="4"
Visibility="{Binding Results.Visbility}"> Visibility="{Binding Results.Visbility}">
<Border.Effect> <Border.Effect>
<DropShadowEffect BlurRadius="12" Opacity="0.4" ShadowDepth="4" /> <DropShadowEffect BlurRadius="16" Opacity="0.8" ShadowDepth="0" />
</Border.Effect> </Border.Effect>
<xaml:WindowsXamlHost <xaml:WindowsXamlHost
InitialTypeName="PowerLauncher.UI.ResultList" InitialTypeName="PowerLauncher.UI.ResultList"

View File

@ -152,8 +152,8 @@ namespace PowerLauncher
_launcher = (PowerLauncher.UI.LauncherControl)host.Child; _launcher = (PowerLauncher.UI.LauncherControl)host.Child;
_launcher.DataContext = _viewModel; _launcher.DataContext = _viewModel;
_launcher.KeyDown += _launcher_KeyDown; _launcher.KeyDown += _launcher_KeyDown;
_launcher.TextBox.TextChanging += QueryTextBox_TextChanging; _launcher.QueryTextBox.TextChanging += QueryTextBox_TextChanging;
_launcher.TextBox.Loaded += TextBox_Loaded; _launcher.QueryTextBox.Loaded += TextBox_Loaded;
_launcher.PropertyChanged += UserControl_PropertyChanged; _launcher.PropertyChanged += UserControl_PropertyChanged;
_viewModel.PropertyChanged += (o, e) => _viewModel.PropertyChanged += (o, e) =>
{ {
@ -170,16 +170,16 @@ namespace PowerLauncher
} }
// to select the text so that the user can continue to type // to select the text so that the user can continue to type
if(!String.IsNullOrEmpty(_launcher.TextBox.Text)) if(!String.IsNullOrEmpty(_launcher.QueryTextBox.Text))
{ {
_launcher.TextBox.SelectAll(); _launcher.QueryTextBox.SelectAll();
} }
} }
} }
else if(e.PropertyName == nameof(MainViewModel.SystemQueryText)) else if(e.PropertyName == nameof(MainViewModel.SystemQueryText))
{ {
this._isTextSetProgramatically = true; this._isTextSetProgramatically = true;
_launcher.TextBox.Text = _viewModel.SystemQueryText; _launcher.QueryTextBox.Text = _viewModel.SystemQueryText;
} }
}; };
} }
@ -317,31 +317,7 @@ namespace PowerLauncher
// To populate the AutoCompleteTextBox as soon as the selection is changed or set. // To populate the AutoCompleteTextBox as soon as the selection is changed or set.
// Setting it here instead of when the text is changed as there is a delay in executing the query and populating the result // Setting it here instead of when the text is changed as there is a delay in executing the query and populating the result
_launcher.AutoCompleteTextBox.PlaceholderText = ListView_FirstItem(_viewModel.QueryText); _launcher.AutoCompleteTextBlock.Text = ListView_FirstItem(_viewModel.QueryText);
}
private void ResultsList_ItemClick(object sender, ItemClickEventArgs e)
{
ResultViewModel result = e?.ClickedItem as ResultViewModel;
if(result != null)
{
_viewModel.Results.SelectedItem = result;
_viewModel.OpenResultCommand.Execute(null);
}
}
private void AutoSuggestBox_QuerySubmitted(AutoSuggestBox sender, AutoSuggestBoxQuerySubmittedEventArgs args)
{
if (args != null && args.ChosenSuggestion != null)
{
ResultViewModel result = (ResultViewModel)args.ChosenSuggestion;
if (result != null)
{
_viewModel.Results.SelectedItem = result;
_viewModel.OpenResultCommand.Execute(null);
}
}
} }
private const int millisecondsToWait = 200; private const int millisecondsToWait = 200;
@ -371,18 +347,18 @@ namespace PowerLauncher
if(this._isTextSetProgramatically) if(this._isTextSetProgramatically)
{ {
this._launcher.TextBox.TextChanged += QueryTextBox_TextChangedProgramatically; this._launcher.QueryTextBox.TextChanged += QueryTextBox_TextChangedProgramatically;
} }
else else
{ {
this._launcher.TextBox.TextChanged += QueryTextBox_TextChangedByUserInput; this._launcher.QueryTextBox.TextChanged += QueryTextBox_TextChangedByUserInput;
} }
} }
private void ClearAllQueryTextChangedHanlders() private void ClearAllQueryTextChangedHanlders()
{ {
this._launcher.TextBox.TextChanged -= QueryTextBox_TextChangedProgramatically; this._launcher.QueryTextBox.TextChanged -= QueryTextBox_TextChangedProgramatically;
this._launcher.TextBox.TextChanged -= QueryTextBox_TextChangedByUserInput; this._launcher.QueryTextBox.TextChanged -= QueryTextBox_TextChangedByUserInput;
} }
private void QueryTextBox_TextChangedProgramatically(object sender, Windows.UI.Xaml.Controls.TextChangedEventArgs e) private void QueryTextBox_TextChangedProgramatically(object sender, Windows.UI.Xaml.Controls.TextChangedEventArgs e)
@ -400,7 +376,7 @@ namespace PowerLauncher
//To clear the auto-suggest immediately instead of waiting for selection changed //To clear the auto-suggest immediately instead of waiting for selection changed
if (text == String.Empty) if (text == String.Empty)
{ {
_launcher.AutoCompleteTextBox.PlaceholderText = String.Empty; _launcher.AutoCompleteTextBlock.Text = String.Empty;
} }
_viewModel.QueryText = text; _viewModel.QueryText = text;
@ -422,7 +398,7 @@ namespace PowerLauncher
} }
} }
private void WindowsXamlHost_PreviewMouseDown(object sender, MouseButtonEventArgs e) private void WindowsXamlHost_PreviewMouseDown(object sender, MouseButtonEventArgs e)
{ {
// if (sender != null && e.OriginalSource != null) // if (sender != null && e.OriginalSource != null)
// { // {