PowerToys/Wox/MainWindow.xaml
bao-qian 7e7b41cd8c ResultPanel -> ResultListBox, part 2
part of refactoring for PR #494
2016-02-21 17:04:28 +00:00

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:ResultPanelViewModel}">
<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 ActionPanel}" Visibility="{Binding IsActionPanelVisible,Converter={StaticResource VisibilityConverter}}">
</ContentControl>
</StackPanel>
</Border>
</Window>