<Window x:Class="GraphDrawer.GraphByClick"
        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:GraphDrawer.Properties"
        mc:Ignorable="d"
        Title="Graph Drawer" WindowStartupLocation="CenterScreen" Height="500" Width="800" MinHeight="500" MinWidth="600">
    <Grid  Background="LightBlue">
        <Grid.RowDefinitions>
            <RowDefinition Height="60"/>
            <RowDefinition Height="5*"/>
            <RowDefinition Height="0.8*"/>
        </Grid.RowDefinitions>
        <Menu Height="25" VerticalAlignment="Top" Margin="0,0,0,1">
            <MenuItem Header="Вид графа" VerticalAlignment="Center" Height="25">
                <MenuItem Header="Направление">
                    <MenuItem Header="Направленный" Name="focusedGraphBtn" Click="FocusedGraphBtn_Click"/>
                    <MenuItem Header="Без направления" Name="unfocusedGraphBtn" Click="UnfocusedGraphBtn_Click"/>
                </MenuItem>
                <MenuItem Header="Пометки">
                    <MenuItem Header="Помеченный" Name="namedGraphBtn" Click="NamedGraphBtn_Click"/>
                    <MenuItem Header="Непомеченный" Name="unnamedGraphBtn" Click="UnnamedGraphBtn_Click"/>
                </MenuItem>
            </MenuItem>
            <MenuItem Header="Функции">
                <MenuItem Header="Алгоритмы">
                    
                </MenuItem>
                <MenuItem Header="Матрицы">
                    <MenuItem Header="Матрица смежности" Name="AdjacencyMatrix" Click="AdjacencyMatrix_Click"/>
                    <MenuItem Header="Матрица инцидентности" Name="IncidenceMatrix" Click="IncidenceMatrix_Click"/>
                    <MenuItem Header="Ввести на основе матрицы" Name="CreateGraphByMatrixBtn" Click="CreateGraphByMatrixBtn_Click"/>
                </MenuItem>
            </MenuItem>
        </Menu>
        <Grid x:Name="choiceGrid" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,25,0,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="1.8*"/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <RadioButton IsChecked="True" x:Name="vertexRb" Content="Вершина" FontSize="20" Margin="10,0"/>
            <RadioButton x:Name="edgeRb" Content="Ребро" FontSize="20" Grid.Column="1" Margin="10,0"/>
        </Grid>
        <StackPanel Grid.Row="2" Orientation="Horizontal">
            <Button x:Name="clearBtn" Margin="10" Height="30" Padding="10,0" Content="Очистить" Background="Blue" Foreground="White" BorderThickness="0" Click="ClearBtn_Click"/>
            <Button x:Name="exportPngBtn" Margin="10" Height="30" Content="Скачать PNG" Background="Blue" Foreground="White" BorderThickness="0" Click="ExportPngBtn_Click" Width="118"/>

        </StackPanel>
        <Canvas Grid.Row="1" Background="White" x:Name="canvas" MouseLeftButtonUp="Canvas_MouseUp">
            <Canvas.ContextMenu>
                <ContextMenu>
                    <MenuItem Name="saveBtn" Click="ExportPngBtn_Click" Header="Сохранить" Icon="💾"/>
                    <MenuItem x:Name="printBtn" Click="PrintBtn_Click" Header="Печать" Icon="🖨️"/>
                    <MenuItem Header="Удалить">
                        <MenuItem.Icon>
                            <TextBlock Text="🗑"/>
                        </MenuItem.Icon>
                        <MenuItem Name="delEdgeBtn" Header="Все ребра" Click="DelEdgeBtn_Click"/>
                        <MenuItem Name="delArcBtn" Header="Все дуги"/>
                        <MenuItem Name="delAllBtn" Header="Все элементы" Click="ClearBtn_Click"/>
                    </MenuItem>
                </ContextMenu>
            </Canvas.ContextMenu>
        </Canvas>
    </Grid>
</Window>