mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-15 12:09:18 +08:00
4643810b75
part of refactoring for PR #494
46 lines
2.5 KiB
XML
46 lines
2.5 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, IsDesignTimeCreatable=True}">
|
|
<Window.Resources>
|
|
<DataTemplate DataType="{x:Type vm:ResultsViewModel}">
|
|
<wox:ResultListBox></wox:ResultListBox>
|
|
</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 Results}" Visibility="{Binding IsResultListBoxVisible,Converter={StaticResource VisibilityConverter}}">
|
|
</ContentControl>
|
|
<ContentControl Content="{Binding ContextMenu}" Visibility="{Binding IsContextMenuVisible,Converter={StaticResource VisibilityConverter}}">
|
|
</ContentControl>
|
|
</StackPanel>
|
|
</Border>
|
|
</Window> |