mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-14 03:37:10 +08:00
1b6a43ae15
Add this support to suppress the warning from Resharper
78 lines
4.8 KiB
XML
78 lines
4.8 KiB
XML
<Window x:Class="Wox.MainWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:wox="clr-namespace:Wox"
|
|
xmlns:vm="clr-namespace:Wox.ViewModel" xmlns:converters="clr-namespace:Wox.Converters"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
|
|
Title="Wox"
|
|
Topmost="True"
|
|
Loaded="MainWindow_OnLoaded"
|
|
SizeToContent="Height"
|
|
ResizeMode="NoResize"
|
|
Deactivated="MainWindow_OnDeactivated"
|
|
WindowStyle="None"
|
|
WindowStartupLocation="Manual"
|
|
Drop="MainWindow_OnDrop"
|
|
AllowDrop="True"
|
|
ShowInTaskbar="False"
|
|
Style="{DynamicResource WindowStyle}"
|
|
Icon="Images\app.png"
|
|
AllowsTransparency="True"
|
|
Visibility="{Binding IsVisible,Converter={converters:VisibilityConverter}}"
|
|
PreviewKeyDown="Window_PreviewKeyDown" d:DataContext="{d:DesignInstance vm:MainViewModel}">
|
|
<Window.InputBindings>
|
|
<KeyBinding Key="Esc" Command="{Binding EscCommand}"></KeyBinding>
|
|
<KeyBinding Key="Tab" Command="{Binding SelectNextItemCommand}"></KeyBinding>
|
|
<KeyBinding Key="N" Modifiers="Ctrl" Command="{Binding SelectNextItemCommand}"></KeyBinding>
|
|
<KeyBinding Key="J" Modifiers="Ctrl" Command="{Binding SelectNextItemCommand}"></KeyBinding>
|
|
|
|
<KeyBinding Key="Tab" Modifiers="Shift" Command="{Binding SelectPrevItemCommand}"></KeyBinding>
|
|
<KeyBinding Key="P" Modifiers="Ctrl" Command="{Binding SelectPrevItemCommand}"></KeyBinding>
|
|
<KeyBinding Key="K" Modifiers="Ctrl" Command="{Binding SelectPrevItemCommand}"></KeyBinding>
|
|
|
|
<KeyBinding Key="O" Modifiers="Ctrl" Command="{Binding CtrlOCommand}"></KeyBinding>
|
|
|
|
<KeyBinding Key="D" Modifiers="Ctrl" Command="{Binding SelectNextPageCommand}"></KeyBinding>
|
|
<KeyBinding Key="U" Modifiers="Ctrl" Command="{Binding SelectPrevPageCommand}"></KeyBinding>
|
|
|
|
<KeyBinding Key="F1" Command="{Binding StartHelpCommand}"></KeyBinding>
|
|
|
|
<KeyBinding Key="Enter" Modifiers="Shift" Command="{Binding ShiftEnterCommand}"></KeyBinding>
|
|
|
|
<KeyBinding Key="Enter" Command="{Binding OpenResultCommand}"></KeyBinding>
|
|
<KeyBinding Key="Enter" Modifiers="Ctrl" Command="{Binding OpenResultCommand}"></KeyBinding>
|
|
<KeyBinding Key="Enter" Modifiers="Alt" Command="{Binding OpenResultCommand}"></KeyBinding>
|
|
|
|
<KeyBinding Key="D1" Modifiers="Alt" Command="{Binding OpenResultCommand}" CommandParameter="0"></KeyBinding>
|
|
<KeyBinding Key="D2" Modifiers="Alt" Command="{Binding OpenResultCommand}" CommandParameter="1"></KeyBinding>
|
|
<KeyBinding Key="D3" Modifiers="Alt" Command="{Binding OpenResultCommand}" CommandParameter="2"></KeyBinding>
|
|
<KeyBinding Key="D4" Modifiers="Alt" Command="{Binding OpenResultCommand}" CommandParameter="3"></KeyBinding>
|
|
<KeyBinding Key="D5" Modifiers="Alt" Command="{Binding OpenResultCommand}" CommandParameter="4"></KeyBinding>
|
|
<KeyBinding Key="D6" Modifiers="Alt" Command="{Binding OpenResultCommand}" CommandParameter="5"></KeyBinding>
|
|
|
|
<KeyBinding Key="Back" Command="{Binding BackCommand}"></KeyBinding>
|
|
</Window.InputBindings>
|
|
<Window.Resources>
|
|
<DataTemplate DataType="{x:Type vm:ResultPanelViewModel}">
|
|
<wox:ResultPanel></wox:ResultPanel>
|
|
</DataTemplate>
|
|
<converters:VisibilityConverter x:Key="VisibilityConverter" />
|
|
</Window.Resources>
|
|
<Border Style="{DynamicResource WindowBorderStyle}" MouseDown="Border_OnMouseDown">
|
|
<StackPanel Orientation="Vertical">
|
|
<TextBox Style="{DynamicResource QueryBoxStyle}" Text="{Binding QueryText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
PreviewDragOver="TbQuery_OnPreviewDragOver" AllowDrop="True"
|
|
x:Name="tbQuery" />
|
|
<Line Style="{DynamicResource PendingLineStyle}" x:Name="progressBar" Y1="0" Y2="0" X2="100" Height="2" StrokeThickness="1"
|
|
Visibility="{Binding IsProgressBarVisible,Converter={StaticResource VisibilityConverter}}">
|
|
<Line.ToolTip>
|
|
<ToolTip IsOpen="{Binding IsProgressBarTooltipVisible}"></ToolTip>
|
|
</Line.ToolTip>
|
|
</Line>
|
|
<ContentControl Content="{Binding SearchResultPanel}" Visibility="{Binding IsSearchResultPanelVisible,Converter={StaticResource VisibilityConverter}}">
|
|
</ContentControl>
|
|
<ContentControl Content="{Binding ActionPanel}" Visibility="{Binding IsActionPanelVisible,Converter={StaticResource VisibilityConverter}}">
|
|
</ContentControl>
|
|
</StackPanel>
|
|
</Border>
|
|
</Window> |