<Window x:Class="DemoExam.windows.WindowEditAgent"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        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"
        xmlns:local="clr-namespace:DemoExam.windows"
        mc:Ignorable="d"
        Title="Настройки агента" Height="700" Width="400"
        Icon="..\images\logo.ico"
        Loaded="Window_Loaded"
        MinHeight="700"
        MaxHeight="700"
        MinWidth="400"
        MaxWidth="400"
        >
    <Grid>
        <StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
            <GroupBox Header="Наименование">
                <TextBox Width="250" Text="{Binding Path=SelectedAgent.Title}"></TextBox>
            </GroupBox>
            <GroupBox Header="Тип агента">
                <ComboBox ItemsSource="{Binding GetListTypeAgent}" SelectedValue="{Binding AgentTypeSelectedAgent}"></ComboBox>
            </GroupBox>
            <GroupBox Header="Приоритет">
                <TextBox Width="250" Text="{Binding Path=SelectedAgent.Priority}"></TextBox>
            </GroupBox>

            <StackPanel Orientation="Vertical">
                <GroupBox Header="Приоритет">
                    <Image Width="200" Height="150" Source="{Binding Path=SelectedAgent.GetActualImage}"></Image>
                </GroupBox>
                <Button Command="{Binding Path = SelectedAgent.ChangeImageCommand}">Загрузить фотографию</Button>
            </StackPanel>
            <GroupBox Header="Адрес">
                <TextBox Width="250" Text="{Binding Path=SelectedAgent.Address}"></TextBox>
            </GroupBox>
            <GroupBox Header="ИНН">
                <TextBox Width="250" Text="{Binding Path=SelectedAgent.INN}"></TextBox>
            </GroupBox>
            <GroupBox Header="КПП">
                <TextBox Width="250" Text="{Binding Path=SelectedAgent.KPP}"></TextBox>
            </GroupBox>
            <GroupBox Header="Имя директора">
                <TextBox Width="250" Text="{Binding Path=SelectedAgent.DirectorName}"></TextBox>
            </GroupBox>
            <GroupBox Header="Телефон">
                <TextBox Width="250" Text="{Binding Path=SelectedAgent.Phone}"></TextBox>
            </GroupBox>
            <GroupBox Header="Email">
                <TextBox Width="250" Text="{Binding Path=SelectedAgent.Email}"></TextBox>
            </GroupBox>
            <Button Click="Button_Save_Click">Сохранить</Button>
            <Button Click="Button_Delete_Click" Loaded="Button_Delete_Loaded">Удалить</Button>
        </StackPanel>
    </Grid>
</Window>
