mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 10:16:24 +02:00
simplifying the xaml and making things tighter (#2327)
This commit is contained in:
@@ -5,9 +5,6 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d"
|
||||
xmlns:ToolkitBehaviors="using:Microsoft.Toolkit.Uwp.UI.Animations.Behaviors"
|
||||
xmlns:Core="using:Microsoft.Xaml.Interactions.Core"
|
||||
xmlns:Interactivity="using:Microsoft.Xaml.Interactivity"
|
||||
ActualThemeChanged="UserControl_ActualThemeChanged"
|
||||
Loaded="UserControl_Loaded"
|
||||
d:DesignHeight="300"
|
||||
@@ -357,19 +354,18 @@
|
||||
<Grid
|
||||
x:Name="PowerBar"
|
||||
Background="{ThemeResource BackdropAcrylicBrush}"
|
||||
Height="72"
|
||||
Translation="0,0,16"
|
||||
Height="60"
|
||||
VerticalAlignment="Top">
|
||||
<TextBox
|
||||
x:Name="AutoCompleteTextBox"
|
||||
x:FieldModifier="public"
|
||||
Style="{StaticResource CustomAutoSuggestBoxTextBoxStyle}"
|
||||
Height="72"
|
||||
Height="60"
|
||||
IsReadOnly="True"
|
||||
AllowFocusOnInteraction="False"
|
||||
ScrollViewer.BringIntoViewOnFocusChange="False"
|
||||
Canvas.ZIndex="0"
|
||||
Margin="0"
|
||||
Margin="0"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="24"
|
||||
DesiredCandidateWindowAlignment="BottomEdge" />
|
||||
@@ -379,7 +375,7 @@
|
||||
x:FieldModifier="public"
|
||||
Style="{StaticResource CustomAutoSuggestBoxTextBoxStyle}"
|
||||
PlaceholderText="Start typing"
|
||||
Height="72"
|
||||
Height="60"
|
||||
ScrollViewer.BringIntoViewOnFocusChange="False"
|
||||
Canvas.ZIndex="0"
|
||||
Margin="0"
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
<Grid
|
||||
x:Name="PowerBar"
|
||||
Background="{ThemeResource BackdropAcrylicBrush}"
|
||||
Translation="0,0,16"
|
||||
VerticalAlignment="Top">
|
||||
<ListView
|
||||
x:Name="SuggestionsList"
|
||||
@@ -22,13 +21,12 @@
|
||||
MinHeight="{Binding Results.MaxHeight}"
|
||||
AllowFocusOnInteraction="False"
|
||||
IsItemClickEnabled="True"
|
||||
Margin="{ThemeResource AutoSuggestListMargin}"
|
||||
Margin="0"
|
||||
Padding="{ThemeResource AutoSuggestListPadding}"
|
||||
ItemsSource="{Binding Results.Results, Mode=OneWay}"
|
||||
SelectionMode="Single"
|
||||
SelectedIndex="{Binding Results.SelectedIndex, Mode=TwoWay}"
|
||||
Style="{StaticResource ListViewNoAnimations}"
|
||||
>
|
||||
Style="{StaticResource ListViewNoAnimations}">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate >
|
||||
<Grid Height="72" Width="690" Background="Transparent" RowSpacing="0">
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<Window x:Class="PowerLauncher.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:wox="clr-namespace:PowerLauncher"
|
||||
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"
|
||||
@@ -30,24 +29,38 @@
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border x:Name="SearchBoxBorder" Margin="10" Grid.Row="0" BorderThickness="4" CornerRadius="4">
|
||||
<Border
|
||||
x:Name="SearchBoxBorder"
|
||||
Grid.Row="0"
|
||||
Margin="8"
|
||||
BorderThickness="4"
|
||||
CornerRadius="4">
|
||||
<Border.Effect>
|
||||
<DropShadowEffect BlurRadius="12" Opacity="0.3" ShadowDepth="4" />
|
||||
<DropShadowEffect BlurRadius="12" Opacity="0.4" ShadowDepth="4" />
|
||||
</Border.Effect>
|
||||
<xaml:WindowsXamlHost InitialTypeName="PowerLauncher.UI.LauncherControl" ChildChanged="WindowsXamlHostTextBox_ChildChanged" />
|
||||
<xaml:WindowsXamlHost
|
||||
InitialTypeName="PowerLauncher.UI.LauncherControl"
|
||||
ChildChanged="WindowsXamlHostTextBox_ChildChanged" />
|
||||
</Border>
|
||||
<Border Grid.Row="1" Name="myElement" Background="Transparent" Height="10"/>
|
||||
<Border x:Name="ListBoxBorder" Margin="10" Grid.Row="2" BorderThickness="4" CornerRadius="4" Visibility="{Binding Results.Visbility}">
|
||||
<Border
|
||||
x:Name="ListBoxBorder"
|
||||
Grid.Row="1"
|
||||
Margin="8"
|
||||
BorderThickness="4"
|
||||
CornerRadius="4"
|
||||
Visibility="{Binding Results.Visbility}">
|
||||
<Border.Effect>
|
||||
<DropShadowEffect BlurRadius="12" Opacity="0.3" ShadowDepth="4" />
|
||||
<DropShadowEffect BlurRadius="12" Opacity="0.4" ShadowDepth="4" />
|
||||
</Border.Effect>
|
||||
<xaml:WindowsXamlHost PreviewMouseDown="WindowsXamlHost_PreviewMouseDown" InitialTypeName="PowerLauncher.UI.ResultList" ChildChanged="WindowsXamlHostListView_ChildChanged" />
|
||||
<xaml:WindowsXamlHost
|
||||
InitialTypeName="PowerLauncher.UI.ResultList"
|
||||
ChildChanged="WindowsXamlHostListView_ChildChanged"
|
||||
PreviewMouseDown="WindowsXamlHost_PreviewMouseDown" />
|
||||
</Border>
|
||||
</Grid>
|
||||
<Window.InputBindings>
|
||||
<KeyBinding Key="Escape" Command="{Binding EscCommand}" />
|
||||
<KeyBinding Key="Enter" Command="{Binding OpenResultCommand}"></KeyBinding>
|
||||
<KeyBinding Key="Enter" Command="{Binding OpenResultCommand}" />
|
||||
</Window.InputBindings>
|
||||
</Window>
|
||||
|
||||
Reference in New Issue
Block a user