<UserControl x:Class="DataViewDashboard.Views.CustomerTile"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" >
    <Grid>
        <Grid.Resources>
            <Style TargetType="TextBlock">
                <Setter Property="Margin" Value="2" />
                <Setter Property="FontSize" Value="12"/>
            </Style>
        </Grid.Resources>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition />
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <!--<TextBlock Grid.ColumnSpan="4" FontSize="24">
                                    <Run Text="{Binding FirstName}" />
                                    <Run Text="{Binding LastName}" />
        </TextBlock>-->

        <TextBlock Text="Company Name:" Grid.Row="1"/>
        <TextBlock Text="Email Address:" Grid.Row="2"/>
        <TextBlock Text="Phone:" Grid.Row="3"/>
        <TextBlock Text="Last Modified:" Grid.Row="4"/>

        <TextBlock Text="{Binding CompanyName}" Grid.Column="1" Grid.Row="1"/>
        <TextBlock Text="{Binding EmailAddress}" Grid.Column="1" Grid.Row="2"/>
        <TextBlock Text="{Binding Phone}" Grid.Column="1" Grid.Row="3"/>
        <TextBlock Text="{Binding ModifiedDate, Converter={StaticResource dateTimeConverter}, ConverterParameter=d}" Grid.Column="1" Grid.Row="4"/>

        <c1:C1TabControl TabItemShape="Rectangle" Grid.Row="5" Margin="0 10 0 0" Grid.ColumnSpan="4" ItemsSource="{Binding CustomerAddresses}" Height="155">
            <c1:C1TabControl.ItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding AddressType}" Margin="2" FontSize="12"/>
                </DataTemplate>
            </c1:C1TabControl.ItemTemplate>
            <c1:C1TabControl.ContentTemplate>
                <DataTemplate>
                    <ScrollViewer>
                        <Grid>
                            <Grid.Resources>
                                <Style TargetType="TextBlock">
                                    <Setter Property="Margin" Value="2" />
                                    <Setter Property="FontSize" Value="12"/>
                                </Style>
                            </Grid.Resources>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition />
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition />
                            </Grid.ColumnDefinitions>

                            <TextBlock Text="Line 1:" />
                            <TextBlock Text="Line 2:" Grid.Row="1"/>
                            <TextBlock Text="City:" Grid.Row="2"/>
                            <TextBlock Text="State/Province:" Grid.Row="3"/>
                            <TextBlock Text="Country/Region:" Grid.Row="4"/>
                            <TextBlock Text="Postal Code:" Grid.Row="5"/>
                            <TextBlock Text="Last Modified:" Grid.Row="6"/>

                            <TextBlock Text="{Binding Address.AddressLine1}" Grid.Column="1" />
                            <TextBlock Text="{Binding Address.AddressLine2}" Grid.Column="1" Grid.Row="1"/>
                            <TextBlock Text="{Binding Address.City}" Grid.Column="1" Grid.Row="2"/>
                            <TextBlock Text="{Binding Address.StateProvince}" Grid.Column="1" Grid.Row="3"/>
                            <TextBlock Text="{Binding Address.CountryRegion}" Grid.Column="1" Grid.Row="4"/>
                            <TextBlock Text="{Binding Address.PostalCode}" Grid.Column="1" Grid.Row="5"/>
                            <TextBlock Text="{Binding Address.ModifiedDate, Converter={StaticResource dateTimeConverter}, ConverterParameter=d}" Grid.Column="1" Grid.Row="6"/>

                        </Grid>
                    </ScrollViewer>
                </DataTemplate>
            </c1:C1TabControl.ContentTemplate>
        </c1:C1TabControl>
    </Grid>
</UserControl>
