<UserControl x:Class="OPlanner.ObjectsPanel" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:CustomControl="clr-namespace:OPlanner">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="TemplatesAndStyles.xaml" />
            </ResourceDictionary.MergedDictionaries>
            <Style TargetType="ListBoxItem" x:Key="ObjectsBoxStyle">
                <EventSetter Event="MouseDoubleClick" Handler="ObjectDoubleClickHandler"></EventSetter>
            </Style>
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid Style="{StaticResource VerticalPanel}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
        </Grid.RowDefinitions>
        <Label Style="{StaticResource PanelHeader}" Grid.Row="0">Objects</Label>
        <Grid Grid.Row="1" Margin="10,5,10,5">
            <Grid.RowDefinitions>
                <RowDefinition Height="*"></RowDefinition>
                <RowDefinition Height="Auto"></RowDefinition>
            </Grid.RowDefinitions>
            <CustomControl:DragListBox Grid.Row="0" MinHeight="100" MinWidth="50" Margin="0,0,0,1" x:Name="objectsBox" SelectionChanged="objectsBox_SelectionChanged" SelectionMode="Extended" ItemContainerStyle="{StaticResource ObjectsBoxStyle}" KeyDown="objectsBox_KeyDown">
            </CustomControl:DragListBox>
            <Button Grid.Row="1" HorizontalAlignment="Right" Name="deleteButton" Click="deleteButton_Click">
				<Image Stretch="None" Source="Icons\Delete.png"></Image>
			</Button>
        </Grid>
    </Grid>
</UserControl>
