<Window x:Class="V8Reader.Controls.ProcedureListWnd"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:v8r="clr-namespace:V8Reader.Core"
        Title="Список процедур" Height="362" Width="427" ShowInTaskbar="False" WindowStyle="ToolWindow" WindowStartupLocation="CenterOwner" TextOptions.TextFormattingMode="Display">
    <Grid Margin="5">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="265*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="265*"/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>

        <TextBox x:Name="txtProcName" Margin="3" Grid.Row="0" Grid.Column="0" TextChanged="txtProcName_TextChanged" PreviewKeyDown="txtProcName_PreviewKeyDown"></TextBox>
        
        <ListBox x:Name="lbProcList" Grid.Column="0" Grid.Row="1" Margin="3" KeyDown="lbProcList_KeyDown">
            <ListBox.Resources>
                <v8r:IconSet ImageUri="pack://application:,,,/Resources/module_icons.png" x:Key="tbIcons"/>
                <v8r:IconSetItem Icons="{StaticResource tbIcons}" Index="1" x:Key="procIcon"/>
            </ListBox.Resources>
            
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                        <Image Height="16" Width="16" Source="{Binding Source={StaticResource procIcon}, Path=Item}"/>
                        <TextBlock Text="{Binding}" Margin="2,0,0,0"/>
                    </StackPanel>
                </DataTemplate>
            </ListBox.ItemTemplate>

            <ListBox.ItemContainerStyle>
                <Style TargetType="ListBoxItem">
                    <EventSetter Event="MouseDoubleClick" Handler="Elements_MouseDoubleClick"/>
                </Style>
            </ListBox.ItemContainerStyle>

        </ListBox>
        
        <StackPanel Grid.Column="1" Grid.RowSpan="2" Margin="6,0,0,0">
            <StackPanel.Resources>
                <Style x:Key="btnStyle" TargetType="Button">
                    <Setter Property="Margin" Value="3"/>
                    <Setter Property="Width" Value="83"/>
                </Style>
            </StackPanel.Resources>
            
            <Button x:Name="btnGo" Style="{StaticResource btnStyle}" Click="btnGo_Click">Перейти</Button>
            <Button x:Name="btnClose" Style="{StaticResource btnStyle}" Click="btnClose_Click">Отмена</Button>
            <CheckBox x:Name="chkSort" Margin="3,10,0,3" Click="chkSort_Click">Сортировка</CheckBox>
            
        </StackPanel>
        
    </Grid>
</Window>
