<Window
	x:Class="Cosmos.Build.Windows.BuildWindow"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:local="clr-namespace:Cosmos.Build.Windows"
	Title="Building Cosmos Application"
	Height="300"
	Width="496"
	Icon="/Cosmos.Build.Windows;component/Cosmos.ico">
	<Window.Resources>
		<ObjectDataProvider
			x:Key="BuildMessages"
			ObjectType="{x:Type local:BuildLogMessages}" />
	</Window.Resources>
	<Grid>
		<Grid.RowDefinitions>
            <RowDefinition Height="48" />
            <RowDefinition Height="20" />
            <RowDefinition Height="24" />
			<RowDefinition />
			
		</Grid.RowDefinitions>
        <Label 
            x:Name="progressText"
            Grid.Row="0"            
            Content="Unknown"></Label>
        <ProgressBar
			x:Name="progressBuild"
			Grid.Row="1"
			Value="0"></ProgressBar>
        <Label 
            x:Name="warningLabel"
            Grid.Row="2"
            FontWeight="bold"
            Content="Warning/Error messages:"></Label>
        <ListBox
			ItemsSource="{Binding Source={StaticResource BuildMessages}}"
			Name="lboxLog"
			Background="White"
			Grid.Row="3">
			<ListBox.ItemTemplate>
				<DataTemplate
					DataType="{x:Type local:BuildLogMessage}">
					<ListBoxItem
						Name="item"
						Content="{Binding Path=Message}" />
					<DataTemplate.Triggers>
						<DataTrigger
							Binding="{Binding Path=Severity}"
							Value="Error">
							<Setter
								TargetName="item"
								Property="Foreground"
								Value="Red" />
						</DataTrigger>
						<DataTrigger
							Binding="{Binding Path=Severity}"
							Value="Warning">
							<Setter
								TargetName="item"
								Property="Foreground"
								Value="Orange" />
						</DataTrigger>
					</DataTemplate.Triggers>
				</DataTemplate>
			</ListBox.ItemTemplate>
		</ListBox>
    </Grid>
</Window>
