<Window xmlns="https://github.com/avaloniaui"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="d" d:DesignWidth="550" d:DesignHeight="450"
        x:Class="LibationAvalonia.Dialogs.UpgradeNotificationDialog"
		xmlns:controls="clr-namespace:LibationAvalonia.Controls"
		MinWidth="500" MinHeight="400"
		Height="450" Width="550"
		WindowStartupLocation="CenterOwner"
        Title="Upgrade Available">

	<Grid  Margin="6" RowDefinitions="Auto,*,Auto">
		<TextBlock
			TextWrapping="WrapWithOverflow"
			FontSize="15"
			Text="{Binding TopMessage}"
			IsVisible="{Binding TopMessage, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>

		<controls:GroupBox
			Grid.Row="1"
			Label="Release Information"
			Margin="0,10,0,10">
			
			<Grid RowDefinitions="*,Auto,Auto">

				<TextBox
					Grid.Row="0"
					Margin="0,5,0,10"
					Grid.ColumnSpan="2"
					IsReadOnly="true"
					TextWrapping="WrapWithOverflow"
					FontSize="12"
					HorizontalAlignment="Stretch"
					Text="{Binding ReleaseNotes}" />
				
				<TextBlock						
					Grid.Row="1"
					VerticalAlignment="Bottom"
					Text="Download Release:" />

				<controls:LinkLabel
					Grid.Row="1"
					Margin="0,0,0,10"
					VerticalAlignment="Center"
					HorizontalAlignment="Right"
					Text="View the source code on GitHub"
					Tapped="Github_Tapped" />

				<controls:LinkLabel
					Grid.Row="2"
					Margin="0,0,0,10"
					VerticalAlignment="Center"
					Text="{Binding DownloadLinkText}"
					Tapped="Download_Tapped" />

				<controls:LinkLabel
					Grid.Row="2"
					VerticalAlignment="Center"
					HorizontalAlignment="Right"
					Text="Go to Libation's website"
					Tapped="Website_Tapped" />

			</Grid>

		</controls:GroupBox>
		<Grid
			Grid.Row="3"
			ColumnDefinitions="*,Auto">

			<Button
				Grid.Column="0"
				HorizontalAlignment="Left"
				Content="Don't remind me&#x0a;about this release"
				Click="DontRemind_Click" />
			<Button
				Grid.Column="1"
				TabIndex="0"
				FontSize="16"
				Name="btnYes"
				Classes="SaveButton"
				VerticalAlignment="Stretch"
				HorizontalAlignment="Right"
				VerticalContentAlignment="Center"
				Content="{Binding OkText}"
				Click="OK_Click" />
		</Grid>
	</Grid>
</Window>
