<Window xmlns="https://github.com/avaloniaui"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:vm="using:VeloeMinecraftLauncher.ViewModels"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="d" d:DesignWidth="400" d:DesignHeight="150"
		Width = "400" MinHeight="150"
		SizeToContent="Height"
        x:Class="VeloeMinecraftLauncher.Views.MessageWindow"
		xmlns:titlebars="using:VeloeMinecraftLauncher.Views.TitleBar"
        Icon="/Assets/avalonia-logo.ico"
        Title="Error"
		TransparencyLevelHint="AcrylicBlur"
		Background="Transparent"
		CanResize="True"
		ExtendClientAreaToDecorationsHint="True"
		ExtendClientAreaChromeHints="NoChrome"
		ExtendClientAreaTitleBarHeightHint="-1">

	<Design.DataContext>
		<vm:MessageWindowViewModel/>
	</Design.DataContext>

	<Panel>
		<ExperimentalAcrylicBorder IsHitTestVisible="False">
			<ExperimentalAcrylicBorder.Material>
				<ExperimentalAcrylicMaterial
					BackgroundSource="Digger"
					TintColor="{Binding InterfaceColor}"
					TintOpacity="1"
					MaterialOpacity="{Binding MaterialOpacity}"/>
			</ExperimentalAcrylicBorder.Material>
		</ExperimentalAcrylicBorder>
		<DockPanel>
			<titlebars:TitleBarWindow
			  IsSeamless="False"
			  IsIconVisible="False"
			  IsMaximizeVisible="False"
			  TitleText="Message"
			  DockPanel.Dock="Top"
			  x:Name="titleBar">
			</titlebars:TitleBarWindow>
			<Grid
				DockPanel.Dock="Bottom"
				Margin="10">
				<Grid.RowDefinitions>
					<RowDefinition Height="Auto"/>
					<RowDefinition Height="*"/>
					<RowDefinition Height="35"/>
				</Grid.RowDefinitions>
					<TextBlock
						Grid.Row="0"
						Text="{Binding Message}" 
						TextWrapping="Wrap"
						HorizontalAlignment="{Binding HorizontalAlignment}"
						VerticalAlignment="{Binding	VerticalAlignment}"/>		
					<TextBox 
						Grid.Row="1"
						Text="{Binding ErrorTrace}" 
						IsVisible="{Binding IsErrorTraceVisible}"					
						IsReadOnly="True" 
						Margin="0 10 0  10"
						HorizontalAlignment="Stretch" 
						VerticalAlignment="Stretch"/>
				<StackPanel
					Grid.Row="2"
					HorizontalAlignment="Right"
					Orientation="Horizontal">
					<Button
						Content="{Binding ButtonText}"
						IsVisible="{Binding	IsLogButtonVisible}"
						Command="{Binding OpenLogFile}"/>
					<Button
						Content="{Binding ButtonCancel}"
						IsCancel="True"
						IsVisible="{Binding IsCancelButtonVisible}"
						Width="65"
						Margin="10 0 0 0"
						Command="{Binding CloseWindowCancel}"
						CommandParameter="{Binding $parent[Window]}"/>
					<Button
						Content="{Binding ButtonOk}"
						IsDefault="True"
						IsCancel="{Binding !IsCancelButtonVisible}"
						Width="40"
						Margin="10 0 0 0"
						Command="{Binding CloseWindowOk}"
						CommandParameter="{Binding $parent[Window]}"/>
				</StackPanel>	
			</Grid>							
		</DockPanel>
	</Panel>
</Window>
