<UserControl x:Class="Gremlin.MVVM.ShellView"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            xmlns:cal="http://www.caliburnproject.org"
            xmlns:local="clr-namespace:Gremlin.MVVM">
    
    <StackPanel Orientation="Vertical">
        
        <!--Contacts-->
        <StackPanel Orientation="Vertical">
            <TextBox x:Name="SearchContact" Text="Suche nach Kontakt" Margin="10,5,10,5"/>
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch">
                <TextBlock x:Name="SelectedContactFirstName" Text="{Binding Path=SelectedContact.FirstName}"  Margin="10,5,10,5"/>
                <TextBlock x:Name="SelectedContactLastName" Text="{Binding Path=SelectedContact.LastName}"  Margin="10,5,10,5"/>
            </StackPanel>
            <DataGrid x:Name="Contacts" AutoGenerateColumns="True" CanUserAddRows="True" FrozenColumnCount="3" SelectionMode="Single" SelectedItem="SelectedContact" MaxHeight="200" Margin="10,5,10,5" />
        </StackPanel>

        <!--Quote-->
        <local:QuoteView cal:Bind.Model="{Binding QuoteVM}"/>

        <!--Buttons-->
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch">
            <Button x:Name="GenerateNewQuote" Content="Neues Angebot" Margin="10,5,10,5"/>
            <Button x:Name="ReadLineItems" Content="Angebot aus PriceSurfer einfügen" Margin="10,5,10,5"/>
            <Button x:Name="CreateTex" Content="PDF erzeugen und öffnen" Margin="10,5,10,5" IsEnabled="{Binding Path=QuoteReady}"/>
            <!--<Button x:Name="CreatePDF" Content="PDF erzeugen" Margin="10,5,10,5" IsEnabled="{Binding Path=TexCreated}"/>-->
            <!--<Button x:Name="OpenPDF" Content="PDF öffnen" Margin="10,5,10,5" IsEnabled="{Binding Path=PDFCreated}"/>-->
            <!--<Button x:Name="WriteToDB" Content="Write to DB" Margin="10,5,10,5" IsEnabled="{Binding Path=WriteToDB}"/>-->
        </StackPanel>
        
        <StatusBar DockPanel.Dock="Bottom">
            <StatusBarItem>
                <TextBlock Name="lblQuoteReady" Text="QuoteReady:"/>
            </StatusBarItem>
            <StatusBarItem>
                <TextBlock Name="QuoteReady" Text="{Binding Path=QuoteReady}"/>
            </StatusBarItem>
            
            <StatusBarItem>
                <TextBlock Name="lblWroteToDB" Text="WroteToDB:"/>
            </StatusBarItem>
            <StatusBarItem>
                <TextBlock Name="WroteToDB" Text="{Binding Path=WroteToDB}"/>
            </StatusBarItem>
            
            <StatusBarItem>
                <TextBlock Name="lblTexCreated" Text="TexCreated:"/>
            </StatusBarItem>
            <StatusBarItem>
                <TextBlock Name="TexCreated" Text="{Binding Path=TexCreated}"/>
            </StatusBarItem>
            
            <StatusBarItem>
                <TextBlock Name="lblPdfCreated" Text="PdfCreated:"/>
            </StatusBarItem>
            <StatusBarItem>
                <TextBlock Name="PdfCreated" Text="{Binding Path=PdfCreated}"/>
            </StatusBarItem>
            
            <StatusBarItem>
                <TextBlock Name="lblPdfOpened" Text="PdfOpened:"/>
            </StatusBarItem>
            <StatusBarItem>
                <TextBlock Name="PdfOpened" Text="{Binding Path=PdfOpened}"/>
            </StatusBarItem>
        </StatusBar>
        
    </StackPanel>    
</UserControl>