﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
	
	<UserControl.Resources>
		<Style x:Key="HeaderText" TargetType="TextBlock">
			<Setter Property="Foreground" Value="White"/>
			<Setter Property="FontFamily" Value="#Barkentina 1"/>
			<Setter Property="FontSize" Value="13"/>
			<Setter Property="Margin" Value="12,2,0,0"/>
			<Setter Property="Stroke" Value="#80000000"/>
			<Setter Property="StrokeThickness" Value="0.75"/>
		</Style>
		<Style x:Key="StatText" TargetType="TextBlock">
			<Setter Property="Foreground" Value="White"/>
			<Setter Property="FontFamily" Value="#Barkentina 1"/>
			<Setter Property="FontSize" Value="20"/>
			<Setter Property="Stroke" Value="#80000000"/>
			<Setter Property="StrokeThickness" Value="1.5"/>
		</Style>
		<Style x:Key="StatBar" TargetType="ProgressBar">
			<Setter Property="MinHeight" Value="5"/>
			<Setter Property="Foreground" Value="Silver"/>
			<Setter Property="Background" Value="Gray"/>
			<Setter Property="Margin" Value="8,0"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="ProgressBar">
						<Border x:Name="PART_Track" Background="{TemplateBinding Background}" CornerRadius="1">
							<Grid x:Name="PART_Indicator" HorizontalAlignment="Left">
								<Border Background="{TemplateBinding Foreground}" CornerRadius="0.5" Margin="1"/>
							</Grid>
						</Border>
					</ControlTemplate>
				</Setter.Value>
			</Setter>			
		</Style>
		<LinearGradientBrush x:Key="SeparatorBg" EndPoint="1,0" StartPoint="0,0">
			<GradientStop Color="#0CFFFFFF"/>
			<GradientStop Color="#F2FFFFFF" Offset="0.15"/>
			<GradientStop Color="#F2FFFFFF" Offset="0.85"/>
			<GradientStop Color="#0CFFFFFF" Offset="1"/>
		</LinearGradientBrush>
	</UserControl.Resources>
	
	<Border BorderBrush="#FFDEEA68" BorderThickness="2" CornerRadius="2" Padding="8">
		<Border.Background>
			<LinearGradientBrush EndPoint="0.5,0" StartPoint="0,0" SpreadMethod="Reflect">
				<GradientStop Color="#BD000000"/>
				<GradientStop Color="#8F000000" Offset="0.25"/>
				<GradientStop Color="#BD000000" Offset="1"/>
				<GradientStop Color="#8F000000" Offset="0.75"/>
			</LinearGradientBrush>
		</Border.Background>
		<StackPanel MinWidth="200">
			
			<TextBlock Text="HEALTH" Style="{StaticResource HeaderText}"/>
			<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
				<TextBlock Text="{Binding Health}" Style="{StaticResource StatText}"/>
				<TextBlock Text="/" Style="{StaticResource StatText}" Margin="2,0"/>
				<TextBlock Text="{Binding HealthMax}" Style="{StaticResource StatText}"/>
			</StackPanel>
			<ProgressBar Value="{Binding Health}" Minimum="0" Maximum="{Binding HealthMax}" Style="{StaticResource StatBar}"
				Background="#FF3F892F" Foreground="#FF46FF00"/>

			<Rectangle Height="2" Fill="{StaticResource SeparatorBg}" Margin="0,2"/>

			<TextBlock Text="ATTACK" Style="{StaticResource HeaderText}"/>
			<TextBlock Text="{Binding Attack}" Style="{StaticResource StatText}" HorizontalAlignment="Center" Padding="0,0,0,5"/>

			<Rectangle Height="2" Fill="{StaticResource SeparatorBg}" Margin="0,2"/>

			<TextBlock Text="DEFENSE" Style="{StaticResource HeaderText}"/>
			<TextBlock Text="{Binding Defense}" Style="{StaticResource StatText}" HorizontalAlignment="Center" Padding="0,0,0,5"/>

			<Rectangle Height="2" Fill="{StaticResource SeparatorBg}" Margin="0,2"/>

			<TextBlock Text="GOLD" Style="{StaticResource HeaderText}"/>
			<TextBlock Text="{Binding Gold}" Style="{StaticResource StatText}" HorizontalAlignment="Center" Padding="0,0,0,5"/>

			<Rectangle Height="2" Fill="{StaticResource SeparatorBg}" Margin="0,2"/>

			<TextBlock Text="EXPERIENCE/NEXT" Style="{StaticResource HeaderText}"/>
			<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
				<TextBlock Text="{Binding Experience}" Style="{StaticResource StatText}"/>
				<TextBlock Text="/" Style="{StaticResource StatText}" Margin="2,0"/>
				<TextBlock Text="{Binding NextLevel}" Style="{StaticResource StatText}"/>
			</StackPanel>
			<ProgressBar Value="{Binding Experience}" Minimum="0" Maximum="{Binding NextLevel}" Style="{StaticResource StatBar}"
				Background="#FF2F8589" Foreground="Cyan"/>

			<Rectangle Height="2" Fill="{StaticResource SeparatorBg}" Margin="0,2"/>

		</StackPanel>
	</Border>
</UserControl>