<Window
    x:Class="ExampleCore.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:emoji="clr-namespace:Emoji.Wpf;assembly=Emoji.Wpf"
    xmlns:local="clr-namespace:ExampleCore"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:prism="http://prismlibrary.com/"
    xmlns:system="clr-namespace:System;assembly=System.Runtime"
    xmlns:ui="http://schemas.modernwpf.com/2019"
    Title="{x:Static local:MainWindowViewModel.WindowTitle}"
    Width="800"
    Height="500"
    d:DataContext="{d:DesignInstance local:MainWindowViewModel}"
    prism:ViewModelLocator.AutoWireViewModel="True"
    ui:WindowHelper.UseModernWindowStyle="True"
    TextOptions.TextFormattingMode="Display"
    TextOptions.TextRenderingMode="Auto"
    mc:Ignorable="d">
    <Window.Resources>
        <system:Boolean x:Key="True">True</system:Boolean>
        <system:Boolean x:Key="False">False</system:Boolean>
    </Window.Resources>

    <b:Interaction.Triggers>
        <b:EventTrigger EventName="ContentRendered">
            <b:InvokeCommandAction Command="{Binding UpdateCommand}" CommandParameter="{StaticResource True}" />
        </b:EventTrigger>
    </b:Interaction.Triggers>
    <ScrollViewer>
        <StackPanel>
            <StackPanel.Resources>
                <Style BasedOn="{StaticResource {x:Type Button}}" TargetType="Button">
                    <Setter Property="Height" Value="45" />
                    <Setter Property="Margin" Value="10" />
                    <Setter Property="FontSize" Value="24" />
                    <Setter Property="HorizontalAlignment" Value="Stretch" />
                </Style>
            </StackPanel.Resources>
            <Button
                Command="{Binding UpdateCommand}"
                CommandParameter="{StaticResource False}"
                Content="Update" />
            <Button Command="{Binding OpenFolderDialogCommand}" Content="Open Folder Dialog" />
            <Button Command="{Binding OpenFileDialogCommand}" Content="Open File Dialog" />
            <emoji:TextBlock
                Margin="20"
                HorizontalAlignment="Center"
                FontSize="60"
                Text="😂" />
            <GroupBox Margin="10" Header="Command line parameters">
                <TextBlock
                    Background="WhiteSmoke"
                    FontFamily="Consolas"
                    Text="{Binding CommandLineParameters}"
                    TextWrapping="Wrap" />
            </GroupBox>
        </StackPanel>
    </ScrollViewer>
</Window>