<localSchView:AbstractAppointmentEditForm x:Class="BeWo.Scheduler.View.AbsenceTimeEditForm"
                                          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:localSchView="clr-namespace:BeWo.Scheduler.View"
                                          xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
                                          xmlns:dxschint="http://schemas.devexpress.com/winfx/2008/xaml/scheduler/internal" 
                                          xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                                          mc:Ignorable="d" Height="233" Width="330">
    <localSchView:AbstractAppointmentEditForm.Resources>
        <dxschint:TimeSpanToDateTimeConverter x:Key="TimeSpanToDateTimeConverter"/>
        <dxschint:InvertedBoolConverter x:Key="InvertedBoolConverter"/>
    </localSchView:AbstractAppointmentEditForm.Resources>

    <Grid Margin="3">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="100" />
            <ColumnDefinition Width="140" />
            <ColumnDefinition Width="80" />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>

        <Label Grid.Row="0" Content="Mitarbeiter" />
        <Label x:Name="LblEmployee" Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" />
        
        <!--<Label Grid.Row="0" VerticalAlignment="Center">Betreff</Label>
        <dxe:TextEdit Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="3" Margin="3" Text="{Binding Controller.Subject, UpdateSourceTrigger=PropertyChanged}" Height="23"/>-->

        <Label Grid.Row="1" Grid.Column="0" VerticalAlignment="Center">Start</Label>
        <dxe:DateEdit MaskType="DateTimeAdvancingCaret" Grid.Row="1" Grid.Column="1" Background="White" Height="23" MinWidth="80" Margin="3" Name="NEW_datepickerStartDate" EditValue="{Binding Controller.DisplayStartDate}" />
        <dxe:TextEdit Grid.Column="2" Grid.Row="1" MaskType="DateTime" Mask="t" MaskUseAsDisplayFormat="True" Margin="3" Height="23"
                                                   EditValue ="{Binding Controller.DisplayStartTime, Converter={StaticResource TimeSpanToDateTimeConverter}}" IsEnabled="{Binding ElementName=chkAllDay, Path=IsChecked, Converter={StaticResource InvertedBoolConverter}}"/>
        
        <Label Grid.Row="2" Grid.Column="0" VerticalAlignment="Center">Ende</Label>
        <dxe:DateEdit MaskType="DateTimeAdvancingCaret" Grid.Column="1" Grid.Row="2" MinWidth="80" Height="23" Margin="3" Name="NEW_datepickerEndDate" 
                      EditValue="{Binding Controller.DisplayEndDate}" />
        <dxe:TextEdit Grid.Column="2" Grid.Row="2" MaskType="DateTime" Mask="t" MaskUseAsDisplayFormat="True" Margin="3" Height="23"
                      EditValue ="{Binding Controller.DisplayEndTime, Converter={StaticResource TimeSpanToDateTimeConverter}}" 
                      IsEnabled="{Binding ElementName=chkAllDay, Path=IsChecked, Converter={StaticResource InvertedBoolConverter}}"/>

        <Label Grid.Row="4" Grid.Column="0" VerticalAlignment="Center">Kategorie</Label>
        <dxe:ComboBoxEdit x:Name="LabelEdit"
                Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="2"
                Margin="3" Height="23" IsTextEditable="False" EditValueChanged="labelEdit_EditValueChanged" ApplyItemTemplateToSelectedItem="True">
            <dxe:ComboBoxEdit.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                        <Border Background="{Binding Brush}" Height="15" Width="15" BorderThickness="1" BorderBrush="Black" Margin="3,0,0,0" />
                        <TextBlock Margin="5,0,3,0" Text="{Binding DisplayName}" VerticalAlignment="Center" />
                    </StackPanel>
                </DataTemplate>
            </dxe:ComboBoxEdit.ItemTemplate>
        </dxe:ComboBoxEdit>
        
        <Label Grid.Row="6" Grid.Column="0" Content="Bemerkungen" />
        <TextBox Grid.Column="1" Grid.Row="6" Grid.ColumnSpan="3" AcceptsReturn="True" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" 
                 Height="69" Margin="3" Text="{Binding Controller.Description, UpdateSourceTrigger=PropertyChanged}" Name="TextboxNewNotice" />
        
        <StackPanel Grid.Row="9" Grid.ColumnSpan="4" Grid.Column="0" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="3">
            <Button Name="ButtonOk" Margin="3,0,3,0" Click="button_ok_Click" Height="25" Width="80">OK</Button>
            <Button Name="ButtonCancel" Margin="3,0,3,0" Click="button_cancel_Click" Height="25" Width="80">Abbrechen</Button>
            <Button Name="ButtonDelete" Margin="3,0,0,0" Click="button_delete_Click" Height="25" Width="80">Löschen</Button>
        </StackPanel>
    </Grid>
</localSchView:AbstractAppointmentEditForm>
