<Page x:Class="esoft.Pages.Diagram"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:local="clr-namespace:esoft.Pages"
      xmlns:chart="clr-namespace:System.Windows.Forms.DataVisualization.Charting;assembly=System.Windows.Forms.DataVisualization"
      mc:Ignorable="d" 
      d:DesignHeight="1000"
      Title="Графики" Width="1920" >

    <Grid Background="#e6e6e6">

        <Grid.RowDefinitions>
            <RowDefinition Height="70"/>
            <RowDefinition Height="323*"/>
            <RowDefinition Height="75"/>
        </Grid.RowDefinitions>

        <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" Height="42" Width="1900">

            <Separator Width="100" Background="{x:Null}"/>

            <TextBlock Text="Уровень исполнителей:" FontSize="25" FontWeight="Bold" Height="30"/>
            <ComboBox x:Name="cmbExecuter" MinWidth="200" SelectionChanged="UpdateChar" Height="25" Margin="10, 10, 0, 0"/>

            <Separator Width="50" Background="{x:Null}"/>

            <TextBlock Text="Тип диаграммы:" FontSize="25" FontWeight="Bold" Height="30"/>
            <ComboBox x:Name="cmbType" MinWidth="200" FontSize="15" HorizontalAlignment="Right" SelectionChanged="UpdateChar" Height="25" Margin="10, 10, 0, 0"/>

            <Separator Width="620" Background="{x:Null}"/>

            <Button Grid.Row="3" HorizontalAlignment="Right" Name="BtnClear" Content="Очистить фильтр" Width="196" Height="40" BorderThickness="0" Style="{StaticResource  StandartButtons}" Margin="12, 0, 0, -10" Click="BtnClear_Click">
                <Button.Resources>
                    <Style TargetType="Border">
                        <Setter Property="CornerRadius" Value="10"/>
                    </Style>
                </Button.Resources>
            </Button>

        </StackPanel>

        <WindowsFormsHost Grid.Row="1" Margin="10,10,10,10">
            <chart:Chart x:Name="chartDiagram">
                <chart:Chart.Legends>
                    <chart:Legend/>
                </chart:Chart.Legends>
            </chart:Chart>
        </WindowsFormsHost>

        <StackPanel Orientation="Horizontal" Grid.Row="2">

            <Button Grid.Row="3" HorizontalAlignment="Left" Name="btnExportToExcel" Content="Экспорт в Excel" Width="165" Height="40" BorderThickness="0" Style="{StaticResource  StandartButtons}" Margin="50, -10, 0, 0" Click="btnExportToExcel_Click">
                <Button.Resources>
                    <Style TargetType="Border">
                        <Setter Property="CornerRadius" Value="10"/>
                    </Style>
                </Button.Resources>
            </Button>

            <Button Grid.Row="3" HorizontalAlignment="Left" Name="btnExportToWord" Content="Экспорт в Word" Width="165" Height="40" BorderThickness="0" Style="{StaticResource  StandartButtons}" Margin="20, -10, 0, 0" Click="btnExportToWord_Click">
                <Button.Resources>
                    <Style TargetType="Border">
                        <Setter Property="CornerRadius" Value="10"/>
                    </Style>
                </Button.Resources>
            </Button>

        </StackPanel>

    </Grid>
</Page>
