<UserControl x:Class="OliviaAddInPro.PaneRecogidaSub1View"
             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:extensions="clr-namespace:ArcGIS.Desktop.Extensions;assembly=ArcGIS.Desktop.Extensions"
             xmlns:ui="clr-namespace:OliviaAddInPro"             
             mc:Ignorable="d" d:DesignWidth="300" Height="390"
             d:DataContext="{Binding Path=ui.PaneRecogidaSub1ViewModel}" Loaded="UserControl_Loaded" Unloaded="UserControl_Unloaded" >
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <extensions:DesignOnlyResourceDictionary Source="pack://application:,,,/ArcGIS.Desktop.Framework;component\Themes\Default.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    <StackPanel Orientation="Vertical" Height="Auto">
        <Label Content="Capa de Recogida" HorizontalAlignment="Left" Margin="15,5,0,0" VerticalAlignment="Top" FontWeight="DemiBold"/>
        <Grid Margin="0,5,0,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="45"/>
                <ColumnDefinition Width="200"/>
            </Grid.ColumnDefinitions>
            <Button Content="" HorizontalAlignment="Left" Margin="20,3,0,0" VerticalAlignment="Top" Width="16" Height="16" BorderThickness="0" Click="Button_Click">
                <Button.Background>
                    <ImageBrush ImageSource="../../Images/openfolder.png"/>
                </Button.Background>
            </Button>
            <Label x:Name="label_capareco" Content="{Binding Path=LblCapaElems, Mode = TwoWay}" Grid.Column="1" HorizontalAlignment="Left" Margin="13,0,0,0" VerticalAlignment="Top" Width="221" Height="30" Grid.ColumnSpan="3"/>
        </Grid>
        <Label  Content="Fracción" HorizontalAlignment="Left" Margin="15,0,0,0" VerticalAlignment="Top" FontWeight="DemiBold"/>
        <Grid Margin="20,0,0,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="150"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <ComboBox x:Name="comboBox_frac" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" ItemsSource="{Binding Path=TiposFrac}" HorizontalAlignment="Left" Margin="0,0,0,0" Width="150"
                      SelectionChanged="comboBox_frac_SelectionChanged" SelectedIndex="{Binding Path=TipoFrac, Mode = TwoWay}" 
                      DisplayMemberPath="Item">
                <ComboBox.ItemContainerStyle>
                    <Style TargetType="{x:Type ComboBoxItem}">
                        <Setter Property="IsEnabled" Value="{Binding IsEnabled}"/>
                    </Style>
                </ComboBox.ItemContainerStyle>
                <!--ComboBox.ItemTemplate>                       
                    <DataTemplate>
                        <ComboBoxItem IsEnabled="{Binding IsEnabled}" Content="{Binding Path=Item}"/>
                    </DataTemplate>
                </-->
            </ComboBox>
            <TextBox x:Name="txtBox_densCont" Width="60" ToolTip="{Binding ToolTip_TextDensCont}" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" Visibility="{Binding Path=VisTextDens, Mode = TwoWay}" Grid.Column="1" Margin="10,0" TextWrapping="NoWrap" Text="{Binding Path=TextDensCont, Mode = TwoWay}" TextAlignment="Right" MaxLength="8" PreviewTextInput="txtBox_densCont_PreviewTextInput"/>
            <Label x:Name="label_densCont" Grid.Column="2" Content="kg/m3" Margin="0,-1,0,0" Visibility="{Binding Path=VisTextDens, Mode = TwoWay}"/>
        </Grid>
        <Label  Content="Tipo de carga" HorizontalAlignment="Left" Margin="15,0,0,0" VerticalAlignment="Top" RenderTransformOrigin="-0.391,-0.203" FontWeight="DemiBold"/>
        <Grid Margin="20,0,0,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="150"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <ComboBox x:Name="comboBox_tipoCarg" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" ItemsSource="{Binding Path=TiposCarg}" HorizontalAlignment="Left" Margin="0,0,0,0" 
                      VerticalAlignment="Top" Width="150"
                      SelectionChanged="comboBox_tipoCarg_SelectionChanged" SelectedIndex="{Binding Path=TipoCarg, Mode = TwoWay}" 
                      DisplayMemberPath="Item">
                <ComboBox.ItemContainerStyle>
                    <Style TargetType="{x:Type ComboBoxItem}">
                        <Setter Property="IsEnabled" Value="{Binding IsEnabled}"/>
                    </Style>
                </ComboBox.ItemContainerStyle>
                <!--ComboBox.ItemTemplate>
                    <DataTemplate>
                        <ComboBoxItem IsEnabled="{Binding IsEnabled}" Content="{Binding Path=Item}"/>
                    </DataTemplate>
                </-->
            </ComboBox>
            <ComboBox x:Name="comboBox_tipoLat" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" Visibility="{Binding Path=VisCombLate, Mode = TwoWay}" Grid.Column="1" ItemsSource="{Binding Path=TiposLate, Mode = TwoWay}" HorizontalAlignment="Left" Margin="10,0,0,0" 
                      VerticalAlignment="Top" Width="90"
                      SelectedIndex="{Binding Path=TipoLate, Mode = TwoWay}" SelectionChanged="comboBox_tipoLat_SelectionChanged"/>
        </Grid>
        <Label  Content="Tipo de vehículo" HorizontalAlignment="Left" Margin="15,0,0,0" VerticalAlignment="Top" RenderTransformOrigin="-0.391,-0.203" FontWeight="DemiBold"/>
        <ComboBox x:Name="comboBox_tipoVehic" IsEnabled="{Binding CapaAbierta, Mode=TwoWay}" ItemsSource="{Binding TiposVehic, Mode=TwoWay}" HorizontalAlignment="Left" Margin="20,0,0,0" 
            VerticalAlignment="Top" Width="150"
            SelectedIndex="{Binding TipoVehic}" SelectionChanged="comboBox_tipoVehic_SelectionChanged"/>
        <Label  Content="Capacidad" HorizontalAlignment="Left" Margin="15,0,0,0" VerticalAlignment="Top" RenderTransformOrigin="-0.391,-0.203" FontWeight="DemiBold"/>
        <Grid Margin="20,0,0,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="80"/>
                <ColumnDefinition Width="70"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <ComboBox x:Name="comboBox_tipoCapac" IsEnabled="{Binding EnabComboCapac, Mode=TwoWay}" ItemsSource="{Binding TiposCapac, Mode=TwoWay}" HorizontalAlignment="Left" Margin="0,0,0,0" 
            VerticalAlignment="Top" Width="75"
            SelectedIndex="{Binding TipoCapac}" SelectionChanged="comboBox_tipoCapac_SelectionChanged"/>
            <TextBox x:Name="txtBox_kgCapac" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" Grid.Column="1" Margin="5,0,0,3" TextWrapping="NoWrap" Text="{Binding Path=TextKgCapac, Mode = TwoWay}" TextAlignment="Right" MaxLength="8" PreviewTextInput="txtBox_kgCapac_PreviewTextInput"/>
            <Label x:Name="label_kgmax" Grid.Column="2" Content="kg máx. por viaje" Margin="0,-1,0,0"/>
        </Grid>
        <Label  Content="Tiempo de vaciado de contenedor" HorizontalAlignment="Left" Margin="15,0,0,0" VerticalAlignment="Top" RenderTransformOrigin="-0.391,-0.203" FontWeight="DemiBold"/>
        <Grid Margin="20,0,0,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="80"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <TextBox IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" Margin="0,0,0,8" TextWrapping="NoWrap" Text="{Binding Path=TextTVaci, Mode = TwoWay}" TextAlignment="Right" MaxLength="4" PreviewTextInput="TextBox_PreviewTextInput"/>
            <Label Grid.Column="1" Content="seg." Margin="0,-3,0,8"/>
        </Grid>
        <Label Margin="15,0,0,0" Content="Planta de descarga" FontWeight="DemiBold"/>
        <Grid Margin="0,0,0,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="45"/>
                <ColumnDefinition Width="200"/>
            </Grid.ColumnDefinitions>
            <Button x:Name="button_capaplant" Content="" HorizontalAlignment="Left" Margin="20,3,0,0" VerticalAlignment="Top" Width="16" Height="16" BorderThickness="0" Click="button_capaplant_Click">
                <Button.Background>
                    <ImageBrush ImageSource="../../Images/openfolder.png"/>
                </Button.Background>
            </Button>
            <Label x:Name="label_capaplant" Content="{Binding Path=LblCapaPlant, Mode = TwoWay}" Grid.Column="1" HorizontalAlignment="Left" Margin="13,0,-33,0" VerticalAlignment="Top" Width="221" Height="30" Grid.ColumnSpan="2"/>
        </Grid>
    </StackPanel>
</UserControl>
