mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-14 11:39:16 +08:00
57 lines
2.9 KiB
XML
57 lines
2.9 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: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="OnLoaded"
|
|
Closing="OnClosing"
|
|
PreviewKeyDown="OnPreviewKeyDown"
|
|
Drop="OnDrop"
|
|
Deactivated="OnDeactivated"
|
|
SizeToContent="Height"
|
|
ResizeMode="NoResize"
|
|
WindowStyle="None"
|
|
WindowStartupLocation="Manual"
|
|
AllowDrop="True"
|
|
ShowInTaskbar="False"
|
|
Style="{DynamicResource WindowStyle}"
|
|
Icon="Images\app.png"
|
|
AllowsTransparency="True"
|
|
Left="{Binding Left, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
Top="{Binding Top, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
Visibility="{Binding MainWindowVisibility, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
d:DataContext="{d:DesignInstance vm:MainViewModel}">
|
|
<Border Style="{DynamicResource WindowBorderStyle}" MouseDown="OnMouseDown">
|
|
<StackPanel Orientation="Vertical">
|
|
<TextBox Style="{DynamicResource QueryBoxStyle}"
|
|
Text="{Binding QueryText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
PreviewDragOver="OnPreviewDragOver"
|
|
AllowDrop="True"
|
|
x:Name="QueryTextBox">
|
|
<TextBox.ContextMenu>
|
|
<ContextMenu>
|
|
<MenuItem Command="ApplicationCommands.Cut"/>
|
|
<MenuItem Command="ApplicationCommands.Copy"/>
|
|
<MenuItem Command="ApplicationCommands.Paste"/>
|
|
<Separator />
|
|
<MenuItem Header="Settings" Click="OnContextMenusForSettingsClick" />
|
|
</ContextMenu>
|
|
</TextBox.ContextMenu>
|
|
</TextBox>
|
|
<Line x:Name="ProgressBar" HorizontalAlignment="Right"
|
|
Style="{DynamicResource PendingLineStyle}" Visibility="{Binding ProgressBarVisibility, Mode=TwoWay}"
|
|
Y1="0" Y2="0" X2="100" Height="2" Width="752" StrokeThickness="1">
|
|
</Line>
|
|
<ContentControl Visibility="{Binding ResultListBoxVisibility}" >
|
|
<wox:ResultListBox DataContext="{Binding Results}" PreviewMouseDown="OnPreviewMouseButtonDown" />
|
|
</ContentControl>
|
|
<ContentControl Visibility="{Binding ContextMenuVisibility}">
|
|
<wox:ResultListBox DataContext="{Binding ContextMenu}" PreviewMouseDown="OnPreviewMouseButtonDown" />
|
|
</ContentControl>
|
|
</StackPanel>
|
|
</Border>
|
|
</Window> |