<UserControl x:Class="Machinations.GraphControl"
             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:Machinations"
             xmlns:graph="clr-namespace:Machinations.FromFlash.graph"
             mc:Ignorable="d" 
             DataContext="{Binding RelativeSource={RelativeSource Self}}">
    <UserControl.Resources>
        <Style TargetType="ToggleButton">
            <Setter Property="Width" Value ="40"/>
            <Setter Property="Height" Value ="40"/>
            <Setter Property="Background" Value ="AliceBlue"/>
            <Setter Property="Margin" Value="1"/>
        </Style>
    </UserControl.Resources>
    <Grid Grid.Row="0" Margin="5">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <ToggleButton x:Name="SelectButton" Grid.Row="0" Grid.Column="0"  Click="GraphButtonsClick" >
            <TextBlock Text="Select"/>
        </ToggleButton>
        <Button Grid.Row="0" Grid.Column="1" Content="Select all" FontSize="9" Click="ButtonBase_OnClick"/>
        <ToggleButton x:Name="PoolButton" Grid.Row="1" Grid.Column="0" Click="GraphButtonsClick" Tag="{x:Static graph:NodeClass.Pool}" ToolTip="Pool">
            <Image Source="/Icons/Pool.png"/>
        </ToggleButton>
        <ToggleButton x:Name="GateButton" Grid.Row="1" Grid.Column="1"  Click="GraphButtonsClick" Tag="{x:Static graph:NodeClass.Gate}" ToolTip="Gate">
            <Image Source="/Icons/Gate.png"/>
        </ToggleButton>
        <ToggleButton x:Name="ResourceConnectionButton" Grid.Row="1" Grid.Column="2"  Click="GraphButtonsClick" Tag="{x:Static graph:ConnectionClass.ResourceConnection}" ToolTip="Resource connectionView">
            <Image Source="/Icons/ResourceConnection.png"/>
        </ToggleButton>
        <ToggleButton x:Name="StateConnectionButton" Grid.Row="1" Grid.Column="3"  Click="GraphButtonsClick" Tag="{x:Static graph:ConnectionClass.StateConnection}" ToolTip="State connectionView">
            <Image Source="/Icons/StateConnection.png"/>
        </ToggleButton>
        <ToggleButton x:Name="SourceButton" Grid.Row="2" Grid.Column="0"  Click="GraphButtonsClick" Tag="{x:Static graph:NodeClass.Source}" ToolTip="Source">
            <Image Source="/Icons/source.png"/>
        </ToggleButton>
        <ToggleButton x:Name="DrainButton" Grid.Row="2" Grid.Column="1"  Click="GraphButtonsClick" Tag="{x:Static graph:NodeClass.Drain}" ToolTip="Drain">
            <Image Source="/Icons/drain.png"/>
        </ToggleButton>
        <ToggleButton x:Name="ConverterButton" Grid.Row="2" Grid.Column="2"  Click="GraphButtonsClick" Tag="{x:Static graph:NodeClass.Converter}" ToolTip="Converter">
            <Image Source="/Icons/converter.png"/>
        </ToggleButton>
        <ToggleButton x:Name="TraderButton" Grid.Row="2" Grid.Column="3"  Click="GraphButtonsClick" Tag="{x:Static graph:NodeClass.Trader}" ToolTip="Trader">
            <Image Source="/Icons/trader.png"/>
        </ToggleButton>
        <ToggleButton x:Name="DelayButton" Grid.Row="3" Grid.Column="0"  Click="GraphButtonsClick" Tag="{x:Static graph:NodeClass.Delay}" ToolTip="Delay">
            <Image Source="/Icons/Delay.png"/>
        </ToggleButton>
        <ToggleButton x:Name="RegisterButton" Grid.Row="3" Grid.Column="1"  Click="GraphButtonsClick" Tag="{x:Static graph:NodeClass.Register}" ToolTip="Register">
            <Image Source="/Icons/Register.png"/>
        </ToggleButton>
        <ToggleButton x:Name="EndConditionButton" Grid.Row="3" Grid.Column="2"  Click="GraphButtonsClick" Tag="{x:Static graph:NodeClass.EndCondition}" ToolTip="End condition">
            <Image Source="/Icons/EndCondition.png"/>
        </ToggleButton>
        <ToggleButton x:Name="ArtifitialPlayerButton" Grid.Row="3" Grid.Column="3"  Click="GraphButtonsClick" Tag="{x:Static graph:NodeClass.ArtificialPlayer}" ToolTip="Artifitial player">
            <Image Source="/Icons/AP1.png"/>
        </ToggleButton>
    </Grid>
</UserControl>
