Files
PowerToys/src/modules/imageresizer/ui/Views/MainWindow.xaml

44 lines
1.8 KiB
XML

<Window x:Class="ImageResizer.Views.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ui="http://schemas.modernwpf.com/2019"
xmlns:behaviors="http://schemas.microsoft.com/xaml/behaviors"
xmlns:local="clr-namespace:ImageResizer.Views"
xmlns:p="clr-namespace:ImageResizer.Properties"
xmlns:vm="clr-namespace:ImageResizer.ViewModels"
Content="{Binding CurrentPage}"
Icon="/ImageResizer;component/Resources/ImageResizer.ico"
Name="_this"
ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
Title="{x:Static p:Resources.ImageResizer}"
WindowStartupLocation="CenterScreen"
ui:WindowHelper.UseModernWindowStyle="True"
ui:TitleBar.IsIconVisible="True"
ui:TitleBar.Background="{DynamicResource PrimaryBackgroundBrush}"
AutomationProperties.Name="{x:Static p:Resources.ImageResizer}">
<Window.Resources>
<DataTemplate DataType="{x:Type vm:InputViewModel}">
<local:InputPage/>
</DataTemplate>
<DataTemplate DataType="{x:Type vm:ProgressViewModel}">
<local:ProgressPage/>
</DataTemplate>
<DataTemplate DataType="{x:Type vm:ResultsViewModel}">
<local:ResultsPage/>
</DataTemplate>
</Window.Resources>
<Window.TaskbarItemInfo>
<TaskbarItemInfo ProgressState="Normal" ProgressValue="{Binding Progress}"/>
</Window.TaskbarItemInfo>
<behaviors:Interaction.Triggers>
<behaviors:EventTrigger EventName="Loaded">
<behaviors:InvokeCommandAction Command="{Binding LoadCommand}" CommandParameter="{Binding ElementName=_this}"/>
</behaviors:EventTrigger>
</behaviors:Interaction.Triggers>
</Window>