<localView:BeWoView x:Class="BeWo.View.Detail.ServiceRecordView2"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                    xmlns:localView="clr-namespace:BeWo.View"
                    xmlns:localViewModel="clr-namespace:BeWo.ViewModel" 
                    xmlns:localViewControls="clr-namespace:BeWo.View.Controls"
                    xmlns:localSearchView="clr-namespace:BeWo.View.Search"
                    xmlns:val="clr-namespace:BeWo.Validation" 
                    xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
                    xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
                    xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" 
                    xmlns:ve="http://schemas.devexpress.com/winfx/2008/xaml/docking/visualelements"
                    xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
                    xmlns:detail="clr-namespace:BeWo.View.Detail"
                    xmlns:core="clr-namespace:BS.Shared.Core;assembly=BS.Shared"
                    xmlns:security="clr-namespace:BeWo.Security"
                    Height="Auto" Width="Auto" VerticalAlignment="Stretch" Focusable="True" HorizontalAlignment="Stretch">
    <localView:BeWoView.Resources>
        <Style TargetType="{x:Type Button}" x:Key="DockPanelMaximizeButtonStyle">
            <Style.Setters>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type Button}">
                            <Grid x:Name="Button" Width="18" Height="18" ve:DockPane.HitTestType="MaximizeButton" Background="Transparent">
                                <Grid x:Name="hoveredState" Visibility="Collapsed">
                                    <Border Margin="2,2,0,0" Opacity="0.1" Background="#FF000000" CornerRadius="2,2,2,2" />
                                    <Border Margin="1,1,1,1" Background="#FF666666" CornerRadius="2,2,2,2" Padding="1,1,1,1">
                                        <Border CornerRadius="1,1,1,1" Padding="1,1,1,1">
                                            <Border.Background>
                                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                    <GradientStop Color="#FFD0E3FB" Offset="0" />
                                                    <GradientStop Color="#FFADD0F6" Offset="1" />
                                                    <GradientStop Color="#FFD5E6FA" Offset="0.5" />
                                                </LinearGradientBrush>
                                            </Border.Background>
                                            <Border CornerRadius="1,1,1,1">
                                                <Border.Background>
                                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                        <GradientStop Color="#FFD1E4FC" Offset="0" />
                                                        <GradientStop Color="#FFAED1F6" Offset="1" />
                                                        <GradientStop Color="#FFB5D0F1" Offset="0.5" />
                                                        <GradientStop Color="#FFA4C5ED" Offset="0.5" />
                                                    </LinearGradientBrush>
                                                </Border.Background>
                                            </Border>
                                        </Border>
                                    </Border>
                                </Grid>
                                <Grid x:Name="pressedState" Visibility="Collapsed">
                                    <Border Margin="2,2,1,0" Opacity="0.15" Background="#FFFFFFFF" CornerRadius="2,2,2,2" />
                                    <Border Margin="1,1,1,1" Background="#FF333333" CornerRadius="2,2,2,2" Padding="1,1,1,1">
                                        <Border Background="#FF555555" CornerRadius="1,1,1,1" Padding="1,1,1,1" />
                                    </Border>
                                </Grid>
                                <Border x:Name="glyph" Background="#00FFFEFE" Width="10" Height="10" HorizontalAlignment="Center" VerticalAlignment="Center">
                                    <Grid x:Name="grid" Width="10" Height="8">
                                        <Path Stretch="Fill"
						                      Data="F1 M 1182,761L 1192,761L 1192,769L 1182,769L 1182,761 Z M 1183,764L 1183,768L 1191,768L 1191,764L 1183,764 Z "
						                      HorizontalAlignment="Stretch"
						                      Margin="0,0,0,0"
						                      x:Name="path2"
						                      VerticalAlignment="Stretch"
                                              Fill="#FF555555">
                                        </Path>
                                        <Path Stretch="Fill"
						                      Fill="#FF555555"
						                      Data="F1 M 1182,761L 1192,761L 1192,762L 1182,762L 1182,761 Z "
						                      HorizontalAlignment="Stretch"
						                      Margin="0,0,0,0"
						                      x:Name="path3"
						                      VerticalAlignment="Top"
						                      Height="1" />
                                    </Grid>
                                </Border>
                            </Grid>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsMouseOver" Value="True">
                                    <Setter Property="Visibility" TargetName="hoveredState" Value="Visible" />
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style.Setters>
        </Style>
        <Style TargetType="{x:Type Button}" x:Key="DockPanelRestoreButtonStyle">
            <Style.Setters>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type Button}">
                            <Grid x:Name="Button" Width="18" Height="18" ve:DockPane.HitTestType="RestoreButton" Background="Transparent">
                                <Grid x:Name="hoveredState" Visibility="Collapsed">
                                    <Border Margin="2,2,0,0" Opacity="0.1" Background="#FF000000" CornerRadius="2,2,2,2" />
                                    <Border Margin="1,1,1,1" Background="#FF666666" CornerRadius="2,2,2,2" Padding="1,1,1,1">
                                        <Border CornerRadius="1,1,1,1" Padding="1,1,1,1">
                                            <Border.Background>
                                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                    <GradientStop Color="#FFD0E3FB" Offset="0" />
                                                    <GradientStop Color="#FFADD0F6" Offset="1" />
                                                    <GradientStop Color="#FFD5E6FA" Offset="0.5" />
                                                </LinearGradientBrush>
                                            </Border.Background>
                                            <Border CornerRadius="1,1,1,1">
                                                <Border.Background>
                                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                        <GradientStop Color="#FFD1E4FC" Offset="0" />
                                                        <GradientStop Color="#FFAED1F6" Offset="1" />
                                                        <GradientStop Color="#FFB5D0F1" Offset="0.5" />
                                                        <GradientStop Color="#FFA4C5ED" Offset="0.5" />
                                                    </LinearGradientBrush>
                                                </Border.Background>
                                            </Border>
                                        </Border>
                                    </Border>
                                </Grid>
                                <Grid x:Name="pressedState" Visibility="Collapsed">
                                    <Border Margin="2,2,1,0" Opacity="0.15" Background="#FFFFFFFF" CornerRadius="2,2,2,2" />
                                    <Border Margin="1,1,1,1" Background="#FF333333" CornerRadius="2,2,2,2" Padding="1,1,1,1">
                                        <Border Background="#FF555555" CornerRadius="1,1,1,1" Padding="1,1,1,1" />
                                    </Border>
                                </Grid>
                                <Border x:Name="glyph" Background="#00FFFEFE" Width="10" Height="10" HorizontalAlignment="Center" VerticalAlignment="Center">
                                    <Grid Width="10" Height="9" Margin="0,1,0,0">
                                        <Path Stretch="Fill"
                                            Fill="#FF555555"
						                    x:Name="path"
						                    Data="F1 M 1142,761.001L 1150,761.001L 1150,766L 1142,766L 1142,761.001 Z M 1143,763.001L 1143,765L 1149,765L 1149,763.001L 1143,763.001 Z "
						                    HorizontalAlignment="Stretch"
						                    Margin="2,0.001,0,3.999"
						                    VerticalAlignment="Stretch">
                                        </Path>
                                        <Path Stretch="Fill"
                                            Fill="#FF555555"
						                    x:Name="path3"
						                    Data="F1 M 1140,764.001L 1148,764L 1148,769L 1140,769.001L 1140,764.001 Z M 1141,766L 1141,768.001L 1147,768L 1147,766L 1141,766 Z "
						                    HorizontalAlignment="Stretch"
						                    Margin="0,3,2,1"
						                    VerticalAlignment="Stretch"
						                        >
                                        </Path>
                                        <Path Stretch="Fill"
						                    Fill="#FF555555"
						                    x:Name="path1"
						                    Data="F1 M 1142,761L 1150,761L 1150,762L 1142,762L 1142,761 Z "
						                    HorizontalAlignment="Stretch"
						                    Margin="2,0,0,0"
						                    VerticalAlignment="Top"
						                    Height="1" />
                                        <Path Stretch="Fill"
						                    x:Name="path6"
						                    Fill="#FF555555"
						                    Data="F1 M 1140,764L 1148,764L 1148,765L 1140,765L 1140,764 Z "
						                    HorizontalAlignment="Stretch"
						                    Margin="0,3,2,0"
						                    VerticalAlignment="Top"
						                    Height="1" />
                                    </Grid>
                                </Border>
                            </Grid>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsMouseOver" Value="True">
                                    <Setter Property="Visibility" TargetName="hoveredState" Value="Visible" />
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style.Setters>
        </Style>
        <DataTemplate x:Key="LayoutPanelCaptionTemplate">
            <Border BorderThickness="1,1,1,0" BorderBrush="Gray" CornerRadius="3,3,0,0" Background="#FFEAEDF3" HorizontalAlignment="Stretch" Margin="-5,-3,-6,-2">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <TextBlock FontSize="16" Foreground="{StaticResource TabItemHotTextBrush}" Margin="5,3,3,3" Text="{Binding}" FontFamily="Microsoft Sans Serif"></TextBlock>
                    <Button Content="Maximieren" ToolTip="Maximieren" Grid.Column="1" Click="ButtonClickHandler"  Margin="2" Style="{StaticResource DockPanelMaximizeButtonStyle}"/>
                    <!--<Button Content="Wiederherstellen" ToolTip="Wiederherstellen" Grid.Column="2" Click="RestoreButtonClickHandler" ve:DockPane.HitTestType="ControlBox" Margin="2" Style="{StaticResource DockPanelRestoreButtonStyle}" Visibility="Hidden"/>-->
                </Grid>
            </Border>
        </DataTemplate>
        <DataTemplate x:Key="LayoutPanelCaptionTemplateMinimize">
            <Border BorderThickness="1,1,1,0" BorderBrush="Gray" CornerRadius="3,3,0,0" Background="#FFEAEDF3" HorizontalAlignment="Stretch" Margin="-5,-3,-6,-2">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <TextBlock FontSize="16" Foreground="{StaticResource TabItemHotTextBrush}" Margin="5,3,3,3" Text="{Binding}" FontFamily="Microsoft Sans Serif"></TextBlock>
                    <Button Content="Wiederherstellen" ToolTip="Wiederherstellen" Grid.Column="1" Click="ButtonClickHandler"  Margin="2" Style="{StaticResource DockPanelRestoreButtonStyle}"/>
                    <!--<Button Content="Wiederherstellen" ToolTip="Wiederherstellen" Grid.Column="2" Click="RestoreButtonClickHandler" ve:DockPane.HitTestType="ControlBox" Margin="2" Style="{StaticResource DockPanelRestoreButtonStyle}" Visibility="Hidden"/>-->
                </Grid>
            </Border>
        </DataTemplate>
        <ControlTemplate x:Key="ServiceRecordListBoxTemplate" TargetType="{x:Type ListBox}">
            <Border x:Name="Bd" SnapsToDevicePixels="True" Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}">
                <ScrollViewer Focusable="False" Padding="{TemplateBinding Padding}" HorizontalScrollBarVisibility="Disabled">
                    <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                </ScrollViewer>
            </Border>
        </ControlTemplate>
        <Style x:Key="ServiceRecordListStyle" TargetType="{x:Type ListBox}">
            <Setter Property="Template" Value="{StaticResource ServiceRecordListBoxTemplate}" />
            <Setter Property="Padding" Value="2,0,2,2" />
        </Style>

        <Style x:Key="serviceRecordListBoxItemStyle" TargetType="{x:Type ListBoxItem}">
            <Setter Property="Background" Value="#00FFFFFF" />
            <Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type ItemsControl}}}" />
            <Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type ItemsControl}}}" />
            <Setter Property="Padding" Value="2,0,0,0" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ListBoxItem}">
                        <Border x:Name="Bd" SnapsToDevicePixels="True" Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                    Content="{TemplateBinding Content}"
                                    ContentStringFormat="{TemplateBinding ContentStringFormat}"
                                    ContentTemplate="{TemplateBinding ContentTemplate}" />
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsEnabled" Value="False">
                                <Setter Property="Foreground"
                                        Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </localView:BeWoView.Resources>
    <Grid x:Name="rootGrid">
        <uc:ShadowChrome>
            <GroupBox Style="{StaticResource MainContentGroupBoxStyle}">
                <GroupBox.Header>
                    <StackPanel Orientation="Horizontal" VerticalAlignment="Bottom" Margin="0,11,0,0">
                        <Image Source="..\..\Ressources\Icons\HistoryDisabled.png" RenderTransformOrigin="0.5,0.5" Width="32">
                            <Image.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform ScaleX="1.3" ScaleY="1.3" />
                                    <SkewTransform AngleX="0" AngleY="0" />
                                    <RotateTransform Angle="0" />
                                    <TranslateTransform X="0" Y="-2" />
                                </TransformGroup>
                            </Image.RenderTransform>
                        </Image>
                        <TextBox x:Name="txtTimeRecording" Text="Zeiterfassung" Margin="10,0,0,0" Background="{x:Null}"
                                Foreground="{DynamicResource MainGroupBoxForegroundBrush}" FontSize="22"
                                BorderBrush="{x:Null}" VerticalAlignment="Stretch" BorderThickness="0,0,0,0"
                                Padding="0,0,0,0" />
                    </StackPanel>
                </GroupBox.Header>
                <!--<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">-->
                <Grid>
                    <Grid x:Name="detailContentGrid" Margin="0,3,0,0" Background="{StaticResource ObjectEditBackgroundBrush}">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <Rectangle Fill="{DynamicResource ServiceRecordContentBrush}" Height="6" />
                        <Grid x:Name="root" Grid.Row="1" Margin="8,0,8,-8">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*" />
								<ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="*" />
                            </Grid.RowDefinitions>
                            <StackPanel Orientation="Horizontal" Margin="0,0,0,0" Grid.ColumnSpan="2">
                                <CheckBox Content="Zeiterfassung für ausgewählten Klienten" IsChecked="True" Margin="0,3,0,2"
                                        x:Name="chkWithClient" Checked="ChkWithClient_Checked"
                                        Unchecked="ChkWithClient_Unchecked" />
                                <CheckBox Content="Gruppenbuchung erstellen" Margin="10,3,0,2" IsChecked="False" 
                                        x:Name="chkGroupBooking" Checked="ChkGroupBooking_Checked"
                                        Unchecked="ChkGroupBooking_Unchecked" />
                                <CheckBox Content="Mehrfachbuchung erstellen" Margin="10,3,0,2" IsChecked="False"
                                        x:Name="chkMultiBooking" Checked="ChkMultiBooking_Checked"
                                        Unchecked="chkMultiBooking_Unchecked" />
                                <CheckBox Content="Wohnheimbuchung erstellen" Margin="10,3,0,2" IsChecked="False"
                                        x:Name="chkWohnheimBooking" Checked="ChkWohnheimBookingChecked"
                                        Unchecked="ChkWohnheimBookingUnchecked" />
                                <!-- Bedarfsmedikation -->
                                <CheckBox Content="Bedarfsmedikation" Margin="10,3,0,2" IsChecked="False"
                                        x:Name="chkBedarfsmedikation" Checked="ChkBedarfsmedikationChecked"
                                        Unchecked="ChkBedarfsmedikationUnchecked" security:DemandUserRight.VisibleDemands="ViewAll, MedRecordsAnsehen" />
                                
                                <StackPanel Orientation="Horizontal" Visibility="{Binding Path=IsCustomerWarningActive, Converter={StaticResource BoolVisibilityConverter}}"
                                                Margin="15,0,0,0">
                                    <Button Content="I"  HorizontalAlignment="Right" Style="{DynamicResource WarningButton}" >
                                        <Button.ToolTip>
                                            <TextBlock Text="{Binding Path=CustomerWarning}" />
                                        </Button.ToolTip>
                                    </Button>
                                    <TextBlock Margin="5 2 0 0"
                                               Text="Klient/in ist abwesend"
                                        Foreground="#B80000" FontSize="14" >
                                        <TextBlock.ToolTip>
                                            <TextBlock Text="{Binding Path=CustomerWarning}" />
                                        </TextBlock.ToolTip>
                                    </TextBlock>
                                </StackPanel>
                            </StackPanel>
                            <Grid Grid.Row="1" Grid.Column="0" x:Name="customerSelectAndInfoGrid" Margin="0,3,0,0">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="250" />
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition />
                                </Grid.ColumnDefinitions>
                                <localViewControls:SingleSupportConceptSelectionControl x:Name="supportConceptSelectionControl"
                                        ItemSelected="SupportConceptSelectionControl_ItemSelected" Height="62" VerticalAlignment="Top"
                                        HorizontalContentAlignment="Stretch" />
                                <localViewControls:MultiSupportConceptSelectionControl Grid.Column="0" Margin="0,3,0,0"
                                        x:Name="multiSupportConceptControl" MinHeight="100" MaxHeight="200"
                                        Visibility="Collapsed" ItemSelected="MultiSupportConceptControl_ItemSelected" VerticalAlignment="Top" />
                                <localViewControls:MultiEmployeeSelectionControl Grid.Column="1" Margin="5,3,0,0"
                                        x:Name="multiEmployeeControl" Width="250" MinHeight="100" MaxHeight="200" VerticalAlignment="Top"
                                        Visibility="Collapsed" />
								<Grid Grid.Row="0" VerticalAlignment="Top" Margin="13,1,0,0" Grid.Column="2" Visibility="{Binding HasStatistics, Converter={StaticResource BoolVisibilityConverter}, ConverterParameter='false'}">
									<ScrollViewer VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Auto">
										<Grid x:Name="StatisticInfoGrid">
										</Grid>
									</ScrollViewer>
								</Grid>
                                <Grid Grid.Row="0" VerticalAlignment="Top" Margin="10,3,0,0" Grid.Column="2" Visibility="{Binding HasStatistics, Converter={StaticResource BoolVisibilityConverter}}">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="*" />
                                    </Grid.ColumnDefinitions>
                                    <Grid Margin ="3,-2,0,0" Grid.Column="0" VerticalAlignment="Top">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto" />
                                        </Grid.ColumnDefinitions>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto" />
                                            <RowDefinition Height="Auto" />
                                            <RowDefinition Height="Auto" />
                                            <RowDefinition Height="Auto" />
                                            <RowDefinition Height="Auto" />
                                            <RowDefinition Height="Auto" />
                                        </Grid.RowDefinitions>
                                        <TextBlock Grid.Column="0" Grid.Row="0" Foreground="{DynamicResource BigInfoTextBrush}"
                                                Text="Bewilligungszeitraum:" Height="14" />
                                        <TextBlock x:Name="lblStatisticInfo1" Grid.Column="0" Grid.Row="1" Foreground="{DynamicResource BigInfoTextBrush}"
                                                Text="Geleistet diese Woche/Gesamt:" Height="14" />
                                        <TextBlock x:Name="lblStatisticInfo2" Grid.Column="0" Grid.Row="2" Foreground="{DynamicResource BigInfoTextBrush}"
                                                Text="Bewilligt pro Woche/Gesamt:" Height="14" />
                                        <TextBlock x:Name="lblStatisticInfo3" Grid.Column="0" Grid.Row="3" Foreground="{DynamicResource BigInfoTextBrush}"
                                                Text="Frei pro Woche(Ø)/Gesamt:" Height="14" />
                                        <TextBlock x:Name="lblStatisticInfo4" Grid.Column="0" Grid.Row="4" Foreground="{DynamicResource BigInfoTextBrush}"
                                                Text="Geleistet/bewilligt pro Monat:" Visibility="Collapsed" Height="14"/>
                                        <TextBlock x:Name="lblStatisticInfo5" Grid.Column="0" Grid.Row="5" Foreground="{DynamicResource BigInfoTextBrush}"
                                                Text="Übertrag Monat:" Visibility="Collapsed" Height="14"/>
                                    </Grid>
                                    <ListBox Margin="3,-3,0,0" Grid.Column="1"
                                             ItemsSource="{Binding Statistics}"
                                             BorderThickness="0"
                                             ScrollViewer.CanContentScroll="False"
                                             Background="{x:Null}"
                                             IsTabStop="False"
                                             VerticalAlignment="Top"
                                             ItemContainerStyle="{StaticResource serviceRecordListBoxItemStyle}"
                                             x:Name="serviceRecordListBox">
                                        <ListBox.ItemsPanel>
                                            <ItemsPanelTemplate>
                                                <StackPanel Orientation="Horizontal"></StackPanel>
                                            </ItemsPanelTemplate>
                                        </ListBox.ItemsPanel>
                                        <ListBox.ItemTemplate>
                                            <DataTemplate DataType="{x:Type localViewModel:SupportConceptPeriodStatisticsVM}">
                                                <Border x:Name="ItemBorder" BorderThickness="0,0,1,0" Margin="0,0,4,0" Padding="0,0,4,0" BorderBrush="#FF888888">
                                                    <Grid>
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="Auto" />
                                                            <ColumnDefinition Width="12" />
                                                            <ColumnDefinition Width="Auto" />
                                                            <ColumnDefinition Width="Auto" />
                                                        </Grid.ColumnDefinitions>
                                                        <Grid.RowDefinitions>
                                                            <RowDefinition Height="Auto" />
                                                            <RowDefinition Height="Auto" />
                                                            <RowDefinition Height="Auto" />
                                                            <RowDefinition Height="Auto" />
                                                            <RowDefinition Height="Auto" />
                                                            <RowDefinition Height="Auto" />
                                                        </Grid.RowDefinitions>
                                                    
                                                        <TextBlock x:Name="txtStatisticInfoHeader" Grid.Column="0" Grid.Row="0"
                                                                Text="{Binding Path=Header}" Grid.ColumnSpan="4"
                                                                FontWeight="Bold" FontSize="12" Foreground="{DynamicResource BigInfoTextBrush}" Height="14"/>
                                                        <TextBlock x:Name="txtStatisticInfo1Left" Grid.Column="0" Grid.Row="1"
                                                                Text="{Binding Path=StatisticInfo1Left}"
                                                                FontWeight="Bold" FontSize="12" Foreground="{DynamicResource BigInfoTextBrush}" Height="14"/>
                                                        <StackPanel x:Name="panelStatisticInfo1Error" Grid.Column="2" Grid.Row="1" Orientation="Horizontal" >
                                                            <TextBlock x:Name="txtStatisticInfo1Right"
                                                                    Text="{Binding Path=StatisticInfo1Right}"
                                                                    FontWeight="Bold" FontSize="12" Foreground="{DynamicResource BigInfoTextBrush}" Height="14"/>
                                                            <TextBlock  x:Name="txtStatisticInfo1Error"
                                                                    Text="{Binding Path=StatisticInfo1Error}" ToolTip="Diese Stunden liegen außerhalb des Bewilligungszeitraums!"
                                                                    FontWeight="Bold" FontSize="12" Foreground="Red" Height="14"/>
                                                        </StackPanel>

                                                        <TextBlock x:Name="txtStatisticInfo2Left" Grid.Column="0" Grid.Row="2"
                                                                Text="{Binding Path=StatisticInfo2Left}"
                                                                FontWeight="Bold" FontSize="12" Foreground="{DynamicResource BigInfoTextBrush}" Height="14" Visibility="{Binding StatisticInfo2Left, Converter={StaticResource ObjectVisibilityConverter}}"/>
                                                        <TextBlock x:Name="txtStatisticInfo2Right" Grid.Column="2" Grid.Row="2"
                                                                Text="{Binding Path=StatisticInfo2Right}" 
                                                                FontWeight="Bold" FontSize="12" Foreground="{DynamicResource BigInfoTextBrush}" Height="14" Visibility="{Binding StatisticInfo2Right, Converter={StaticResource ObjectVisibilityConverter}}"/>
                                                        <TextBlock x:Name="txtStatisticInfo3Left" Grid.Column="0" Grid.Row="3"
                                                                Text="{Binding Path=StatisticInfo3Left}"
                                                                FontWeight="Bold" FontSize="12" Foreground="{DynamicResource BigInfoTextBrush}" Height="14" Visibility="{Binding StatisticInfo3Left, Converter={StaticResource ObjectVisibilityConverter}}"/>
                                                        <TextBlock x:Name="txtStatisticInfo3Right" Grid.Column="2" Grid.Row="3"
                                                                Text="{Binding Path=StatisticInfo3Right}"
                                                                FontWeight="Bold" FontSize="12" Foreground="{DynamicResource BigInfoTextBrush}" Height="14" Visibility="{Binding StatisticInfo3Right, Converter={StaticResource ObjectVisibilityConverter}}"/>
                                                        <TextBlock x:Name="txtStatisticInfo4Left" Grid.Column="0" Grid.Row="4"
                                                               Text="{Binding Path=StatisticInfo4Left}"
                                                               FontWeight="Bold" FontSize="12" Foreground="{DynamicResource BigInfoTextBrush}" Height="14" Visibility="{Binding StatisticInfo4Left, Converter={StaticResource ObjectVisibilityConverter}}"/>
                                                        <TextBlock x:Name="txtStatisticInfo4Right" Grid.Column="2" Grid.Row="4"
                                                               Text="{Binding Path=StatisticInfo4Right}"
                                                               FontWeight="Bold" FontSize="12" Foreground="{DynamicResource BigInfoTextBrush}" Height="14" Visibility="{Binding StatisticInfo4Right, Converter={StaticResource ObjectVisibilityConverter}}"/>
                                                        <TextBlock x:Name="txtStatisticInfo5Left" Grid.Column="0" Grid.Row="5"
                                                               Text="{Binding Path=StatisticInfo5Left}"
                                                               FontWeight="Bold" FontSize="12" Foreground="{DynamicResource BigInfoTextBrush}" Height="14" Visibility="{Binding StatisticInfo5Left, Converter={StaticResource ObjectVisibilityConverter}}"/>
                                                        <TextBlock x:Name="txtStatisticInfo5Right" Grid.Column="2" Grid.Row="5"
                                                               Text="{Binding Path=StatisticInfo5Right}"
                                                               FontWeight="Bold" FontSize="12" Foreground="{DynamicResource BigInfoTextBrush}" Height="14" Visibility="{Binding StatisticInfo5Right, Converter={StaticResource ObjectVisibilityConverter}}"/>
                                                    </Grid>
                                                </Border>
                                                <DataTemplate.Triggers>
                                                    <Trigger Property="IsMouseOver" Value="True">
                                                        
                                                    </Trigger>
                                                    <DataTrigger Binding="{Binding Path=IsSelected, RelativeSource={RelativeSource AncestorType={x:Type ListBoxItem}, Mode=FindAncestor}}"
                                                            Value="True">
                                                       
                                                    </DataTrigger>
                                                </DataTemplate.Triggers>
                                            </DataTemplate>
                                        </ListBox.ItemTemplate>
                                    </ListBox>
                                    
                                </Grid>
                            </Grid>
							<Grid Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Bottom" x:Name="zeitraumGrid">
								<Grid.ColumnDefinitions>
									<ColumnDefinition Width="Auto"/>
									<ColumnDefinition Width="Auto"/>
									<ColumnDefinition Width="Auto"/>
									<ColumnDefinition Width="Auto"/>
									<ColumnDefinition Width="Auto"/>
								</Grid.ColumnDefinitions>
								<Grid.RowDefinitions>
									<RowDefinition Height="Auto"/>
									<RowDefinition Height="Auto"/>
									<RowDefinition Height="Auto"/>
									<RowDefinition Height="Auto"/>
								</Grid.RowDefinitions>
								
								<CheckBox Grid.Column="1" Grid.Row="1"  Content="Nur inhaltliche Doku anzeigen" Margin="3" x:Name="chkContentFilter"
										  Visibility="Visible" Grid.ColumnSpan="3" IsChecked="{Binding Path=ShowOnlyContentServiceRecords, UpdateSourceTrigger=PropertyChanged}"/>
								<Label Grid.Column="1" Grid.Row="2" Content="Zeitraum:"></Label>
								<StackPanel Orientation="Horizontal" Grid.Column="2" Grid.Row="2" Grid.ColumnSpan="3">
									<dxe:ComboBoxEdit ItemsSource="{x:Static core:EnumTranslations.ServiceRecordTimeIntervalTranslations}"
												  EditValue="{Binding Path=ServiceRecordTimeInterval, UpdateSourceTrigger=PropertyChanged}" DisplayMember="Value" ValueMember="Key"
												  IsTextEditable="False" x:Name="TimeIntervalComboBox" Width="120" />
									<!--<TextBox x:Name="NDayTextbox" Visibility="Collapsed" Text="{Binding Path=NDays, UpdateSourceTrigger=PropertyChanged}" Width="70" VerticalContentAlignment="Center" />-->
									<!--<Button x:Name="NLadenBtn" Visibility="Collapsed" Click="NLadenBtn_Click" HorizontalContentAlignment="Center" Content="Ok" Width="24" Height="24" Margin="3,0,0,0" />-->
									
								</StackPanel>
								
								<Label Grid.Column="1" Content="Ansicht:" Grid.Row="3"></Label>
								<RadioButton Grid.Column="2" Grid.Row="3" Checked="ChkRowView_Checked" IsChecked="True" ToolTip="Liste anzeigen" Margin="5" GroupName="viewType">
									Liste
								</RadioButton>
								<RadioButton x:Name="ChkDetailView" Grid.Column="3" Grid.Row="3" Checked="ChkDetailView_Checked" ToolTip="Tabelle anzeigen" Margin="5" GroupName="viewType">
									Tabelle
								</RadioButton>
								<Button Grid.Column="4" Grid.Row="3" Click="ReloadButton_OnClick" Margin="3,0,0,0" ToolTip="Liste aktualisieren" Width="24" Height="24">
									<Button.Template>
										<ControlTemplate TargetType="{x:Type Button}">
											<Grid>
												<Image x:Name="imgDisabled" Source="..\..\Ressources\Icons\SymbolRefresh32Disabled.png" />
												<Image x:Name="imgEnabled" Source="..\..\Ressources\Icons\SymbolRefresh32.png" Opacity="0"/>
											</Grid>
											<ControlTemplate.Triggers>
												<Trigger Property="IsMouseOver" Value="true">
													<Setter Property="Opacity" TargetName="imgEnabled" Value="1"/>
												</Trigger>

											</ControlTemplate.Triggers>
										</ControlTemplate>
									</Button.Template>
								</Button>
							</Grid>

                            <Grid Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" x:Name="customerDetailGrid" Margin="0,5,0,0">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="*" />
                                </Grid.RowDefinitions>
                                <GroupBox x:Name="groupBoxNeueLeistung" Header="Neue Leistung hinzufügen" Padding="0,0,0,0"
                                        Style="{DynamicResource ObjectEditGroupBox}" Margin="0,0,0,-3">
                                    <Grid x:Name="gridNeueLeistung">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto" />
                                            <ColumnDefinition Width="*" />
                                        </Grid.ColumnDefinitions>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="*" />
                                        </Grid.RowDefinitions>
                                        <Grid x:Name="newObjectInfoGrid" Grid.IsSharedSizeScope="True">
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="*" />
                                            </Grid.ColumnDefinitions>
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="*" />
                                                <RowDefinition Height="Auto" />
                                            </Grid.RowDefinitions>
                                            <Grid>
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="250" />
                                                </Grid.ColumnDefinitions>
                                                <Grid.RowDefinitions>
                                                    <RowDefinition Height="Auto" />
                                                    <RowDefinition Height="*" />
                                                </Grid.RowDefinitions>
                                                <!-- TextBlock Foreground="Black" TextWrapping="Wrap" Margin="3,3,7,3"  Text="Klient/in:"/-->
                                                <Grid Grid.Column="0" Grid.Row="1">
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition Width="Auto" SharedSizeGroup="Label1"/>
                                                        <ColumnDefinition Width="*" />
                                                    </Grid.ColumnDefinitions>
                                                    <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="Auto" />
                                                        <RowDefinition Height="Auto" />
                                                        <RowDefinition Height="*" />
                                                    </Grid.RowDefinitions>
                                                    <Label x:Name="lblEmployee" Grid.Column="0" Grid.Row="0"
                                                            Content="Mitarbeiter" />
                                                    <uc:PopUpEdit IsReadOnly="True" x:Name="popupedit_employee"
                                                                  DeleteButtonVisibility="Collapsed"
                                                                  PopUpClick="PopupeditEmployeePopUpClick"
                                                                  HorizontalAlignment="Stretch"
                                                                  HorizontalContentAlignment="Stretch" Height="23" Grid.Column="1"
                                                                  Grid.ColumnSpan="1" Grid.Row="0" Margin="3,0,3,3"
                                                                  Cursor="Arrow" PreviewMouseDoubleClick="Popupedit_employee_OnPreviewMouseDoubleClick"/>
                                                    
                                                    <StackPanel Margin="0" Grid.Column="0" Grid.Row="1"
                                                            x:Name="panelGoalLabel">
                                                        <Label Content="Ziele"
                                                               Visibility="{Binding Path=PrototypeVM.IsGoalTreeVisible, Converter={StaticResource BoolVisibilityConverter}}"
                                                               x:Name="ZieleLabel"/>
                                                    </StackPanel>
                                                    <StackPanel Margin="0" Grid.Column="1" Grid.Row="1"
                                                            x:Name="panelGoalTree">
                                                      <StackPanel x:Name="ComboBox_TreeView_Imitation" Orientation="Horizontal" Margin="3,0,3,0"
                                                                  Visibility="{Binding Path=PrototypeVM.IsGoalTreeVisible, Converter={StaticResource BoolVisibilityConverter}}">
                                                        <localViewControls:ComboBoxTreeViewControl  Margin="-3,0,3,0" x:Name="ComboBoxTreeViewControl" TreeViewSourceList="{Binding Path=PrototypeVM.GoalTree, Mode=TwoWay}"/>
                                                      </StackPanel>
                                                    </StackPanel>
                                                    
                                                    <Label Grid.Column="0" Grid.Row="2" Content="Kategorie" />
                                                    <ComboBox Grid.Column="1" Grid.Row="2"
                                                              SelectionChanged="Combobox_category_OnSelectionChanged"
                                                            SelectedItem="{val:ValidationBinding Path=PrototypeVM.Category}"
                                                            ItemsSource="{Binding Path=PrototypeVM.SortedCategories}"
                                                            SelectedIndex="0" x:Name="combobox_category" Margin="3,0,3,3"
                                                            Height="23" />
                                                    
                                                    <Label Grid.Column="0" Grid.Row="3" Content="Leistung" />
                                                    <ComboBox Grid.Column="1" Grid.Row="3"
                                                            SelectedItem="{val:ValidationBinding Path=PrototypeVM.ServiceDescription}"
                                                            ItemsSource="{Binding Path=PrototypeVM.PossibleServiceDescriptions}"
                                                            SelectedIndex="0" x:Name="combobox_services" Margin="3,0,3,3"
                                                            Height="23" />

                                                    <!--<CheckBox Content="Leistung" Grid.Row="4" Grid.ColumnSpan="2"
                                                        x:Name="chkServiceRecordTypeDefaultActivity" IsChecked="{Binding Path=PrototypeVM.IsServiceRecordTypeDefaultActivity}" 
                                                              Visibility="Visible" Margin="3,3,3,3"/>-->
                                                    
                                                    
                                                    <Border Grid.Row="4" Grid.ColumnSpan="2" BorderThickness="0,0,0,1" Margin="3,3,3,3" BorderBrush="#FF86878F" Padding="0,0,0,3">
                                                        <CheckBox Content="Freie/Inhaltliche Doku" 
                                                            x:Name="chkServiceRecordTypeContent" IsChecked="{Binding Path=PrototypeVM.IsServiceRecordTypeContent}"
                                                              Visibility="Visible" />
                                                    </Border>
													<Grid Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="2" x:Name="GridMitEnddatum">
														<Grid.ColumnDefinitions>
															<ColumnDefinition Width="Auto" SharedSizeGroup="Label1" />
															<ColumnDefinition Width="88" />
															<ColumnDefinition Width="Auto" />
															<ColumnDefinition Width="*" />
														</Grid.ColumnDefinitions>
														<Grid.RowDefinitions>
															<RowDefinition Height="Auto" />
															<RowDefinition Height="Auto" />
															
														</Grid.RowDefinitions>
														<Label Grid.Column="0" Grid.Row="0" Content="Startdatum" />
														<dxe:DateEdit Grid.Column="1" Grid.Row="0"
																x:Name="datepicker_newDate2"
																EditValue="{val:ValidationBinding Mode=TwoWay, Path=PrototypeVM.Date}"
																Height="23" Margin="3,0,3,3" MaskType="DateTimeAdvancingCaret" />

														<Label Grid.Column="2" Grid.Row="0" Content="Uhrzeit" x:Name="StartzeitLabel2"/>
														<dxe:TextEdit Grid.Column="3" Grid.Row="0" MaskType="RegEx" Mask="(0?\d|1\d|2[0-3]):[0-5]\d" ShowError="False" MaskShowPlaceHolders="True"
																		  MaskUseAsDisplayFormat="True" InvalidValueBehavior="AllowLeaveEditor"
																		  EditValue="{Binding Mode=TwoWay, Path=PrototypeVM.StartTimeEditString, UpdateSourceTrigger=PropertyChanged}"
																		  x:Name="startTime2"
																		  Height="23"
																		  Margin="3,0,3,3"/>
														
														<Label Grid.Column="0" Grid.Row="1" Content="Enddatum" x:Name="EndDateLabel2"/>
														<dxe:DateEdit Grid.Column="1" Grid.Row="1"
																x:Name="datepicker_newEndDate2"
																EditValue="{val:ValidationBinding Mode=TwoWay, Path=PrototypeVM.EditableEndDate}"
																Height="23" Margin="3,0,3,3" MaskType="DateTimeAdvancingCaret" />
														<Label Grid.Column="2" Grid.Row="2" Content="Uhrzeit"  />
														<dxe:TextEdit Grid.Column="3" Grid.Row="1" MaskType="RegEx" Mask="(0?\d|1\d|2[0-3]):[0-5]\d" ShowError="False" MaskShowPlaceHolders="True"
																	  MaskUseAsDisplayFormat="True" InvalidValueBehavior="AllowLeaveEditor"
																	  EditValue="{Binding Mode=TwoWay, Path=PrototypeVM.EndTimeEditString, UpdateSourceTrigger=PropertyChanged}"
																	  x:Name="endTime2"
																	  Height="23"
																	  Margin="3,0,3,3" />
														
														<Grid Grid.Column="1" Grid.Row="2">
															<Grid.ColumnDefinitions>
																<ColumnDefinition Width="58" />
																<ColumnDefinition Width="*" />
																<ColumnDefinition Width="58" />
															</Grid.ColumnDefinitions>
															
															
														</Grid>
													</Grid>
                                                                                       
                                                    <Label Grid.Column="0" Grid.Row="6" Content="Startdatum" x:Name="startDatum1" />
                                                    <dxe:DateEdit Grid.Column="1" Grid.Row="6"
                                                            x:Name="datepicker_newDate1"
                                                            EditValue="{val:ValidationBinding Mode=TwoWay, Path=PrototypeVM.Date}"
                                                            Height="23" Margin="3,0,3,3" MaskType="DateTimeAdvancingCaret" />
                                                 
                                                  
                                                  <Label Grid.Column="0" Grid.Row="8" Content="Startzeit" x:Name="StartzeitLabel1"/>
                                                    <Grid Grid.Column="1" Grid.Row="8" x:Name="GridOhneEnddatum">
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="58" />
                                                            <ColumnDefinition Width="*" />
                                                            <ColumnDefinition Width="58" />
                                                        </Grid.ColumnDefinitions>
                                                        <dxe:TextEdit MaskType="RegEx" Mask="(0?\d|1\d|2[0-3]):[0-5]\d" ShowError="False" MaskShowPlaceHolders="True" 
                                                                      MaskUseAsDisplayFormat="True" InvalidValueBehavior="AllowLeaveEditor" 
                                                                      EditValue="{Binding Mode=TwoWay, Path=PrototypeVM.StartTimeEditString, UpdateSourceTrigger=PropertyChanged}"
                                                                      x:Name="startTime1"
                                                                      Height="23"
                                                                      Margin="3,0,3,3"/>
                                                        <Label Grid.Column="1" Content="Endzeit" />
                                                        <dxe:TextEdit MaskType="RegEx" Mask="(0?\d|1\d|2[0-3]):[0-5]\d" ShowError="False" MaskShowPlaceHolders="True" 
                                                                      MaskUseAsDisplayFormat="True" InvalidValueBehavior="AllowLeaveEditor" 
                                                                      EditValue="{Binding Mode=TwoWay, Path=PrototypeVM.EndTimeEditString, UpdateSourceTrigger=PropertyChanged}"
                                                                      Grid.Column="2" x:Name="endTime1"
                                                                      Height="23"
                                                                      Margin="3,0,3,3" />
                                                    </Grid>
                                                    <Grid Grid.Column="1" Grid.Row="9">
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="58" />
                                                            <ColumnDefinition Width="*" />
                                                            <ColumnDefinition Width="58" />
                                                        </Grid.ColumnDefinitions>
														<Grid.RowDefinitions>
															<RowDefinition Height="Auto" />
															<RowDefinition Height="Auto" />
														</Grid.RowDefinitions>
                                                        <Label Content="Dauer (min)" Grid.Column="1"/>
                                                        <dxe:SpinEdit MinValue="0" Increment="5" IsFloatValue="False" AllowNullInput="False" x:Name="numerictb_duration"
                                                                      EditValue="{Binding Path=PrototypeVM.Duration, Mode=TwoWay, Converter={StaticResource Int2DecimalConverter}, UpdateSourceTrigger=PropertyChanged}"
                                                                      Grid.Column="2"
                                                                      Height="23" Margin="3,0,3,3"/>
														<Label Grid.Row="1" Content="Gefahrene Kilometer" Grid.Column="0" Grid.ColumnSpan="2" x:Name="lblDistance" HorizontalAlignment="Right"/>
														<dxe:SpinEdit Grid.Row="1" Increment="5" MinValue="0" IsFloatValue="False" AllowNullInput="False" x:Name="numerictb_distance" EditValue="{Binding Mode=TwoWay, Path=PrototypeVM.DistanceInMeter, Converter={StaticResource Int2DecimalConverter}}" Grid.Column="2" Height="23" Margin="3,0,3,3" />
                                                    </Grid>
                                                    <StackPanel Grid.Column="0" Grid.Row="8" Grid.ColumnSpan="3"
                                                            MaxWidth="320" HorizontalAlignment="Left" Visibility="Collapsed">
                                                        <Label Content="{Binding Path=PrototypeVM.Date, Converter={StaticResource Date2CalendarWeekStringConverter}}" />
                                                        <WrapPanel x:Name="wrapPanel_days" />
                                                    </StackPanel>
                                                    
                                                    <Grid Margin="0,5,0,0" Grid.Column="0" Grid.Row="10" Grid.ColumnSpan="2">
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="*" />
                                                            <ColumnDefinition Width="Auto" />
                                                            <ColumnDefinition Width="Auto" />
														                            </Grid.ColumnDefinitions>
                                                        <Grid.RowDefinitions>
                                                            <RowDefinition Height="Auto" />
                                                            <RowDefinition Height="*" />
                                                        </Grid.RowDefinitions>
                   
														<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" VerticalAlignment="Bottom" Content="Dokumentation" x:Name="DokumentationLabel" />
                                                        <!--<DockPanel Grid.Column="0" Grid.Row="1" HorizontalAlignment="Left">
                                                            <Button Margin="3" Content="1" FontFamily="Webdings" Click="VollbildDokuButton_OnClick" />
                                                            <Button Margin="3" Content="A+" HorizontalAlignment="Center" Click="IncreaseFontSizeBtn_Click" />
                                                            <Button Margin="3" Content="A-" Click="DecreaseFontSizeBtn_Click" />
                                                        </DockPanel>
                                                        
                                                        <Button Grid.Row="1" Grid.Column="1" Margin="3" x:Name="TextbausteineBearbeitenButton" Content="@" FontFamily="Webdings" Click="EditTextbausteineClick" ToolTip="Textbausteine bearbeiten" />
                                                        <Button Grid.Row="1" Grid.Column="2" Margin="3" x:Name="TextbausteineButton" Content="Textbausteine" Click="ButtonBase_OnClick" />-->
                                                    </Grid>

                                                  <TabControl Grid.Column="0" Grid.Row="11" Grid.RowSpan="1" Grid.ColumnSpan="2" >
                                                    
                                                    <TabItem Header="Notice1" IsSelected="True" x:Name="TabItem1_Notice">
														<Grid Margin="0" Grid.Column="0" Grid.Row="10" Grid.ColumnSpan="2">
															<Grid.ColumnDefinitions>
																<ColumnDefinition Width="*" />
																<ColumnDefinition Width="Auto" />
																<ColumnDefinition Width="Auto" />
															</Grid.ColumnDefinitions>
															<Grid.RowDefinitions>
																<RowDefinition Height="Auto" />
																<RowDefinition Height="*" />
															</Grid.RowDefinitions>

															<DockPanel Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left">
																<Button Margin="3" Content="1" FontFamily="Webdings" Click="VollbildDokuButton_OnClick" />
																<Button Margin="3" Content="A+" HorizontalAlignment="Center" Click="IncreaseFontSizeBtn_Click" />
																<Button Margin="3" Content="A-" Click="DecreaseFontSizeBtn_Click" />
															</DockPanel>

															<Button Grid.Row="0" Grid.Column="1" Margin="3" x:Name="TextbausteineBearbeitenButton1" Content="@" FontFamily="Webdings" Click="EditTextbausteineClick" ToolTip="Textbausteine bearbeiten" />
															<Button Grid.Row="0" Grid.Column="2" Margin="3" x:Name="TextbausteineButton1" Content="Textbausteine" Click="ButtonBase_OnClick" />

															<TextBox Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3" x:Name="dokumentationsTextBox"
                                                                  Text="{val:ValidationBinding Path=PrototypeVM.Notice, UpdateSourceTrigger=PropertyChanged}"
                                                                  VerticalAlignment="Stretch" FontSize="{Binding Path=DocumentationTextBoxFontSize, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type detail:ServiceRecordView2}}}"
                                                                  AcceptsReturn="True" VerticalScrollBarVisibility="Auto"
                                                                  HorizontalScrollBarVisibility="Hidden" TextWrapping="Wrap"
                                                                  AutoWordSelection="True" Visibility="Visible" Language="de-DE" SpellCheck.IsEnabled="True" />
														</Grid>
                                                      
                                                    </TabItem>
                                                    
                                                    <TabItem Header="Notice2"  x:Name="TabItem2_Notice">
														<Grid Margin="0" Grid.Column="0" Grid.Row="10" Grid.ColumnSpan="2">
															<Grid.ColumnDefinitions>
																<ColumnDefinition Width="*" />
																<ColumnDefinition Width="Auto" />
																<ColumnDefinition Width="Auto" />
															</Grid.ColumnDefinitions>
															<Grid.RowDefinitions>
																<RowDefinition Height="Auto" />
																<RowDefinition Height="*" />
															</Grid.RowDefinitions>

															<DockPanel Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left">
																<Button Margin="3" Content="1" FontFamily="Webdings" Click="VollbildDokuButton_OnClick" />
																<Button Margin="3" Content="A+" HorizontalAlignment="Center" Click="IncreaseFontSizeBtn_Click" />
																<Button Margin="3" Content="A-" Click="DecreaseFontSizeBtn_Click" />
															</DockPanel>

															<Button Grid.Row="0" Grid.Column="1" Margin="3" x:Name="TextbausteineBearbeitenButton2" Content="@" FontFamily="Webdings" Click="EditTextbausteineClick" ToolTip="Textbausteine bearbeiten" />
															<Button Grid.Row="0" Grid.Column="2" Margin="3" x:Name="TextbausteineButton2" Content="Textbausteine" Click="ButtonBase_OnClick" />

															<TextBox Grid.Row="1" Grid.ColumnSpan="3" x:Name="dokumentationsTextBox2"
                                                                  VerticalAlignment="Stretch"
                                                                  Text="{val:ValidationBinding Path=PrototypeVM.Notice2, UpdateSourceTrigger=PropertyChanged}"
                                                                  FontSize="{Binding Path=DocumentationTextBoxFontSize, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type detail:ServiceRecordView2}}}"
                                                                  AcceptsReturn="True" VerticalScrollBarVisibility="Auto"
                                                                  HorizontalScrollBarVisibility="Hidden" TextWrapping="Wrap"
                                                                  AutoWordSelection="True" Visibility="Visible" Language="de-DE" SpellCheck.IsEnabled="True" />
														</Grid>
                                                      
                                                    </TabItem>
                                                    
                                                    <TabItem Header="Notice3" x:Name="TabItem3_Notice">
														<Grid Margin="0" Grid.Column="0" Grid.Row="10" Grid.ColumnSpan="2">
															<Grid.ColumnDefinitions>
																<ColumnDefinition Width="*" />
																<ColumnDefinition Width="Auto" />
																<ColumnDefinition Width="Auto" />
															</Grid.ColumnDefinitions>
															<Grid.RowDefinitions>
																<RowDefinition Height="Auto" />
																<RowDefinition Height="*" />
															</Grid.RowDefinitions>

															<DockPanel Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left">
																<Button Margin="3" Content="1" FontFamily="Webdings" Click="VollbildDokuButton_OnClick" />
																<Button Margin="3" Content="A+" HorizontalAlignment="Center" Click="IncreaseFontSizeBtn_Click" />
																<Button Margin="3" Content="A-" Click="DecreaseFontSizeBtn_Click" />
															</DockPanel>

															<Button Grid.Row="0" Grid.Column="1" Margin="3" x:Name="TextbausteineBearbeitenButton3" Content="@" FontFamily="Webdings" Click="EditTextbausteineClick" ToolTip="Textbausteine bearbeiten" />
															<Button Grid.Row="0" Grid.Column="2" Margin="3" x:Name="TextbausteineButton3" Content="Textbausteine" Click="ButtonBase_OnClick" />

															<TextBox Grid.Row="1" Grid.ColumnSpan="3" x:Name="dokumentationsTextBox3"
                                                                  VerticalAlignment="Stretch"
                                                                  Text="{val:ValidationBinding Path=PrototypeVM.Notice3, UpdateSourceTrigger=PropertyChanged}"
                                                                  FontSize="{Binding Path=DocumentationTextBoxFontSize, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type detail:ServiceRecordView2}}}"
                                                                  AcceptsReturn="True" VerticalScrollBarVisibility="Auto"
                                                                  HorizontalScrollBarVisibility="Hidden" TextWrapping="Wrap"
                                                                  AutoWordSelection="True" Visibility="Visible" Language="de-DE" SpellCheck.IsEnabled="True" />
														</Grid>
                                                    </TabItem>
                                                    
                                                    <TabItem Header="Notice4" x:Name="TabItem4_Notice">
														<Grid Margin="0" Grid.Column="0" Grid.Row="10" Grid.ColumnSpan="2">
															<Grid.ColumnDefinitions>
																<ColumnDefinition Width="*" />
																<ColumnDefinition Width="Auto" />
																<ColumnDefinition Width="Auto" />
															</Grid.ColumnDefinitions>
															<Grid.RowDefinitions>
																<RowDefinition Height="Auto" />
																<RowDefinition Height="*" />
															</Grid.RowDefinitions>

															<DockPanel Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left">
																<Button Margin="3" Content="1" FontFamily="Webdings" Click="VollbildDokuButton_OnClick" />
																<Button Margin="3" Content="A+" HorizontalAlignment="Center" Click="IncreaseFontSizeBtn_Click" />
																<Button Margin="3" Content="A-" Click="DecreaseFontSizeBtn_Click" />
															</DockPanel>

															<Button Grid.Row="0" Grid.Column="1" Margin="3" x:Name="TextbausteineBearbeitenButton4" Content="@" FontFamily="Webdings" Click="EditTextbausteineClick" ToolTip="Textbausteine bearbeiten" />
															<Button Grid.Row="0" Grid.Column="2" Margin="3" x:Name="TextbausteineButton4" Content="Textbausteine" Click="ButtonBase_OnClick" />

															<TextBox Grid.Row="1" Grid.ColumnSpan="3" x:Name="dokumentationsTextBox4"
                                                                  VerticalAlignment="Stretch"
                                                                  Text="{val:ValidationBinding Path=PrototypeVM.Notice4, UpdateSourceTrigger=PropertyChanged}"
                                                                  FontSize="{Binding Path=DocumentationTextBoxFontSize, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type detail:ServiceRecordView2}}}"
                                                                  AcceptsReturn="True" VerticalScrollBarVisibility="Auto"
                                                                  HorizontalScrollBarVisibility="Hidden" TextWrapping="Wrap"
                                                                  AutoWordSelection="True" Visibility="Visible" Language="de-DE" SpellCheck.IsEnabled="True" />
														</Grid>
                                                    </TabItem>
                                                    
                                                    <TabItem Header="Notice5" x:Name="TabItem5_Notice">
														<Grid Margin="0" Grid.Column="0" Grid.Row="10" Grid.ColumnSpan="2">
															<Grid.ColumnDefinitions>
																<ColumnDefinition Width="*" />
																<ColumnDefinition Width="Auto" />
																<ColumnDefinition Width="Auto" />
															</Grid.ColumnDefinitions>
															<Grid.RowDefinitions>
																<RowDefinition Height="Auto" />
																<RowDefinition Height="*" />
															</Grid.RowDefinitions>

															<DockPanel Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left">
																<Button Margin="3" Content="1" FontFamily="Webdings" Click="VollbildDokuButton_OnClick" />
																<Button Margin="3" Content="A+" HorizontalAlignment="Center" Click="IncreaseFontSizeBtn_Click" />
																<Button Margin="3" Content="A-" Click="DecreaseFontSizeBtn_Click" />
															</DockPanel>

															<Button Grid.Row="0" Grid.Column="1" Margin="3" x:Name="TextbausteineBearbeitenButton5" Content="@" FontFamily="Webdings" Click="EditTextbausteineClick" ToolTip="Textbausteine bearbeiten" />
															<Button Grid.Row="0" Grid.Column="2" Margin="3" x:Name="TextbausteineButton5" Content="Textbausteine" Click="ButtonBase_OnClick" />

															<TextBox Grid.Row="1" Grid.ColumnSpan="3" x:Name="dokumentationsTextBox5"
                                                                  VerticalAlignment="Stretch"
                                                                  Text="{val:ValidationBinding Path=PrototypeVM.Notice5, UpdateSourceTrigger=PropertyChanged}"
                                                                  FontSize="{Binding Path=DocumentationTextBoxFontSize, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type detail:ServiceRecordView2}}}"
                                                                  AcceptsReturn="True" VerticalScrollBarVisibility="Auto"
                                                                  HorizontalScrollBarVisibility="Hidden" TextWrapping="Wrap"
                                                                  AutoWordSelection="True" Visibility="Visible" Language="de-DE" SpellCheck.IsEnabled="True" />
														</Grid>
                                                    </TabItem>
                                                  </TabControl>
                                                </Grid>
                                            </Grid>
                                            <Grid Grid.Row="1" Margin="0,0,0,0">
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="*" />
                                                    <ColumnDefinition Width="Auto" />
                                                </Grid.ColumnDefinitions>
                                                <TextBlock TextWrapping="Wrap" VerticalAlignment="Center"
                                                        Text="{Binding Path=Information}" Foreground="#FF000000"
                                                        Margin="0,0,3,0" />
                                                <Button x:Name="button_add" Click="Button_add_Click" FontWeight="Normal"
                                                        Grid.Column="1" Content="Speichern" Height="23"
                                                        BorderThickness="3,3,3,3" Margin="0,2,3,0" />
                                            </Grid>
                                        </Grid>
                                    </Grid>
                                </GroupBox>

                                <Grid x:Name="serviceRecordListContent"  Margin="0,0,0,25" Grid.Column="1" Grid.Row="0" MinWidth="300"  >

                                    <dxb:BarManager>
                                        <dxb:BarManager.Items>
                                            <dxb:BarButtonItem Name="dxEditButton"   Content="Eintrag bearbeiten" Glyph="..\..\Ressources\Icons\Symbol Edit.png" ItemClick="DxEditButton_OnItemClick"/>
                                            <dxb:BarButtonItem Name="dxDeleteButton" Content="Eintrag löschen"    Glyph="..\..\Ressources\Icons\Symbol Delete.png" ItemClick="DxDeleteButton_OnItemClick"/>
											<dxb:BarButtonItem Name="dxHistoryButton" Content="Änderungshistorie anzeigen"    Glyph="..\..\Ressources\Icons\History24.png" ItemClick="DxHistoryButton_OnItemClick"/>
                                        </dxb:BarManager.Items>
                                        <dxg:GridControl x:Name="srGridControl" TabIndex="1" AutoExpandAllGroups="True" Visibility="Hidden" >
                                            <dxb:BarManager.DXContextMenu>
                                                <dxb:PopupMenuInfo Opened="PopupInfo_OnOpened" >
                                                    <dxb:BarButtonItemLink BarItemName="dxEditButton" />
                                                    <dxb:BarButtonItemLink BarItemName="dxDeleteButton" />
													<dxb:BarButtonItemLink BarItemName="dxHistoryButton" />
                                                </dxb:PopupMenuInfo>
                                            </dxb:BarManager.DXContextMenu>
                                            <dxg:GridControl.Columns>
                                                <dxg:GridColumn FieldName="StartDate" AllowEditing="False" Header="Monat" Width="70" GroupIndex="0" GroupInterval="DateMonth" SortIndex="0" SortOrder="Descending">
                                                    <dxg:GridColumn.EditSettings>
                                                        <dxe:DateSettings DisplayFormat="MMMM yyyy"></dxe:DateSettings>
                                                    </dxg:GridColumn.EditSettings>
                                                </dxg:GridColumn>
                                                <dxg:GridColumn FieldName="StartDate" AllowEditing="False" Header="Datum" Width="70"/>
                                              <dxg:GridColumn FieldName="EndTime" AllowEditing="False" Header="Enddatum" Width="70" x:Name="EndDatumHeader"/> 
                                                <dxg:GridColumn FieldName="StartMinutes" AllowEditing="False" Header="Von" Width="45">
                                                    <dxg:GridColumn.EditSettings>
                                                        <dxe:DateSettings DisplayFormat="HH:mm"></dxe:DateSettings>
                                                    </dxg:GridColumn.EditSettings>
                                                </dxg:GridColumn>
                                                <dxg:GridColumn FieldName="EndMinutes" AllowEditing="False" Header="Bis" Width="45">
                                                    <dxg:GridColumn.EditSettings>
                                                        <dxe:DateSettings DisplayFormat="HH:mm"></dxe:DateSettings>
                                                    </dxg:GridColumn.EditSettings>
                                                </dxg:GridColumn>
                                                <dxg:GridColumn FieldName="RoundedDuration" AllowEditing="False" Header="Minuten" Width="65">
                                                    <dxg:GridColumn.EditSettings>
                                                        <dxe:TextEditSettings DisplayFormat="0.##"></dxe:TextEditSettings>
                                                    </dxg:GridColumn.EditSettings>
                                                </dxg:GridColumn>
												<dxg:GridColumn x:Name="DistanceGridColumn" FieldName="DistanceInMeter" AllowEditing="False" Header="Gefahrene km" Width="80">
													<dxg:GridColumn.EditSettings>
														<dxe:TextEditSettings DisplayFormat="0.##"></dxe:TextEditSettings>
													</dxg:GridColumn.EditSettings>
												</dxg:GridColumn>
                                                <dxg:GridColumn FieldName="CategoryString" AllowEditing="False" Header="Leistungskategorie"  />
                                                <dxg:GridColumn FieldName="ServiceDescriptionString" AllowEditing="False" Header="Leistung"  />
                                                <dxg:GridColumn FieldName="Notice"  AllowEditing="False" Header="Dokumentation1"  Width="200" x:Name="head_Doku1"/>
                                       
                                                <dxg:GridColumn FieldName="Notice2" AllowEditing="False" Header="Dokumentation2" Width="200" x:Name="head_Doku2"/>
                                                <dxg:GridColumn FieldName="Notice3" AllowEditing="False" Header="Dokumentation3" Width="200" x:Name="head_Doku3"/>
                                                <dxg:GridColumn FieldName="Notice4" AllowEditing="False" Header="Dokumentation4" Width="200" x:Name="head_Doku4"/>
                                                <dxg:GridColumn FieldName="Notice5" AllowEditing="False" Header="Dokumentation5" Width="200" x:Name="head_Doku5"/>

                                              <dxg:GridColumn FieldName="GoalString" AllowEditing="False" Header="Ziele"  />
                                                <dxg:GridColumn FieldName="EmployeeName" AllowEditing="False" Header="Angelegt für"  />
                                                <dxg:GridColumn FieldName="InsUser" AllowEditing="False" Header="Angelegt von" x:Name="InsertedByColumn" />
                                                <dxg:GridColumn FieldName="InsertedOn" AllowEditing="False" Header="Angelegt am" x:Name="InsertedOnColumn" ></dxg:GridColumn>
                                            </dxg:GridControl.Columns>
                                            <dxg:GridControl.View>
                                                <dxg:TableView x:Name="srTableView"
                                                               AutoWidth="False"
                                                               ShowGroupPanel="True"
                                                               ShowTotalSummary="False"
                                                               NavigationStyle="Row"
                                                               MouseDoubleClick="SrTableView_OnMouseDoubleClick"
                                                               ShowAutoFilterRow="True"/>
                                            </dxg:GridControl.View>
                                        </dxg:GridControl>
                                    </dxb:BarManager>
                                    
                                    <ListBox x:Name="srListBox"
                                             ScrollViewer.CanContentScroll="True"
                                             IsSynchronizedWithCurrentItem="True"
                                             AlternationCount="-1"
                                             Background="{x:Null}"
                                             MouseDoubleClick="ServiceRecordListBox_MouseDoubleClick"
                                             ItemTemplate="{DynamicResource serviceRecordListBoxItemTemplate}"
                                             Style="{DynamicResource ServiceRecordListStyle}"
                                             HorizontalContentAlignment="Stretch"
                                             ItemContainerStyle="{DynamicResource serviceRecordListBoxItemStyle}"
                                             TabIndex="1">
                                        <ListBox.Resources>
                                            <DataTemplate x:Key="serviceRecordListBoxItemTemplate" DataType="{x:Type localViewModel:ServiceRecordVM}">
                                                <Grid x:Name="template" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                                                    <Border x:Name="ItemBorder" CornerRadius="4,4,4,4" Width="Auto" Height="Auto"
                                                            Padding="6" Margin="0,0,0,3"
                                                            Background="{Binding Path=BackgroundBrush}" BorderThickness="1,1,1,1"
                                                            BorderBrush="#FF7E7E7E">
                                                        <Grid TextBlock.Foreground="{Binding Path=TextBlock.Foreground, RelativeSource={RelativeSource TemplatedParent}}">
                                                            <Grid.ColumnDefinitions>
                                                                <ColumnDefinition Width="Auto" />
                                                                <ColumnDefinition Width="12" />
                                                                <ColumnDefinition Width="Auto" />
                                                                <ColumnDefinition Width="12" />
                                                                <ColumnDefinition Width="*" />
                                                            </Grid.ColumnDefinitions>
                                                            <Grid.RowDefinitions>
                                                                <RowDefinition Height="17" />
                                                                <RowDefinition Height="14" />
                                                                <RowDefinition Height="14" />
                                                                <RowDefinition Height="14" />
                                                                <RowDefinition Height="14" />
                                                                <RowDefinition Height="14" />
                                                                <RowDefinition Height="14" />
                                                                <RowDefinition Height="24" />
                                                            </Grid.RowDefinitions>
                                                            <TextBlock Grid.Column="0" Grid.Row="1" Text="Minuten (gerundet):" />
                                                            <TextBlock Grid.Column="0" Grid.Row="2" Text="Leistungskategorie:" />
                                                            <TextBlock Grid.Column="0" Grid.Row="3" Text="Leistung:" />
                                                            <TextBlock Grid.Column="0" Grid.Row="4" Text="Angelegt für:" />
															<TextBlock Grid.Column="0" Grid.Row="5" Text="Angelegt von:" Visibility="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type detail:ServiceRecordView2}}, Path=InsertedOnAndByVisibility}" />
															<TextBlock Grid.Column="0" Grid.Row="6" Text="Angelegt am:" Visibility="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type detail:ServiceRecordView2}}, Path=InsertedOnAndByVisibility}" />
                                                            <TextBlock Grid.Column="0" Grid.Row="0" Text="{Binding Path=LongDateString}" Grid.ColumnSpan="5" FontWeight="Bold" FontSize="13" Foreground="#FF494949" />
                                                            <TextBlock Grid.Column="2" Grid.Row="1" Text="{Binding Path=DurationAndRoundedDuration}" FontWeight="Bold" Background="{x:Null}" Foreground="#FF4E7BC4" />
                                                            <TextBlock Grid.Column="2" Grid.Row="2" Text="{Binding Path=Category}" />
                                                            <TextBlock Grid.Column="2" Grid.Row="3" Text="{Binding Path=ServiceDescription}" />
                                                            <TextBlock Grid.Column="2" Grid.Row="4" Text="{Binding Path=EmployeeName}" />
                                                            <TextBlock Grid.Column="2" Grid.Row="5" Text="{Binding Path=InsUser}" Visibility="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type detail:ServiceRecordView2}}, Path=InsertedOnAndByVisibility}" />
															<TextBlock Grid.Column="2" Grid.Row="6" Text="{Binding Path=InsertedOn}" Visibility="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type detail:ServiceRecordView2}}, Path=InsertedOnAndByVisibility}" />
                                                            <TextBox Grid.Column="4" Grid.Row="1" Grid.RowSpan="7"
                                                                    HorizontalAlignment="Stretch" Text="{Binding Path=Notice}"
                                                                    HorizontalScrollBarVisibility="Hidden"
                                                                    VerticalScrollBarVisibility="Auto" Margin="0,0,0,15"
                                                                    BorderThickness="0" BorderBrush="{x:Null}"
                                                                    Background="{x:Null}" SnapsToDevicePixels="True"
                                                                    MaxHeight="200" TextWrapping="Wrap" AutoWordSelection="True"
                                                                    IsReadOnly="True" GotFocus="TextBox_GotFocus" Tag="{Binding}"
                                                                    IsEnabled="True" Focusable="True" />
                                                        
                                                          
                                                            <StackPanel Orientation="Horizontal" Grid.Column="2" Grid.ColumnSpan="3" Grid.Row="7" Margin="0,7,0,0">
                                                                <TextBlock Text="Ziele:" Visibility="{Binding Path=HasGoals, Converter={StaticResource BoolVisibilityConverter}}"/>
                                                                <TextBlock Text="{Binding Path=GoalString}" Margin="3,0,3,0" ToolTip="{Binding Path=GoalString}"/>
                                                            </StackPanel>

                                                            <Button x:Name="btnEdit" Grid.Column="0" Grid.Row="7" Width="32"
                                                                    Height="22" HorizontalAlignment="Left" Margin="0,0,0,0"
                                                                    BorderThickness="1,1,1,1"
                                                                    Padding="1,1,1,1"
                                                                    Click="BtnEdit_Click" Style="{DynamicResource GlassButton}"
                                                                    Tag="{Binding}"
                                                                    Visibility="{Binding Path=EditAllowed, Converter={StaticResource BoolVisibilityConverter}}">
                                                                <Image Source="..\..\Ressources\Icons\Symbol Edit.png"
                                                                        Stretch="Uniform" Margin="1,1,1,1" />
                                                            </Button>
                                                            <Button x:Name="btnDelete" Grid.Column="0" Grid.Row="7" Width="32"
                                                                    Height="22" HorizontalAlignment="Left" Margin="35,0,0,0"
                                                                    Padding="1,1,1,1"
                                                                    BorderThickness="1,1,1,1"
                                                                    Click="BtnDelete_Click" Style="{DynamicResource GlassButton}"
                                                                    Tag="{Binding}"
                                                                    Visibility="{Binding Path=DeleteAllowed, Converter={StaticResource BoolVisibilityConverter}}">
                                                                <Image Source="..\..\Ressources\Icons\Symbol Delete.png"
                                                                        Stretch="Uniform" Margin="1,1,1,1" />
                                                            </Button>
                                                            <Button x:Name="btnShowHistory" Grid.Column="0" Grid.Row="7" Width="32"
                                                                    Height="22" HorizontalAlignment="Left" Margin="70,0,0,0"
                                                                    Padding="1,1,1,1"
                                                                    BorderThickness="1,1,1,1"
                                                                    Click="BtnShowHistory_Click" Style="{DynamicResource GlassButton}"
                                                                    Tag="{Binding}"
																	Visibility="{Binding Path=IsHistoryAllowed, Converter={StaticResource BoolVisibilityConverter}}">
																<Image Source="..\..\Ressources\Icons\History24.png"
																		Stretch="Uniform" Margin="1,1,1,1" />
															  </Button>
                                                        </Grid>
                                                    </Border>
                                                </Grid>
                                                <DataTemplate.Triggers>
                                                    <Trigger Property="IsMouseOver" Value="True">
                                                        <Setter Property="Background" TargetName="ItemBorder"
                                                                Value="{Binding Path=MouseOverBackgroundBrush}" />
                                                    </Trigger>
                                                    <DataTrigger Binding="{Binding Path=IsSelected, RelativeSource={RelativeSource AncestorType={x:Type ListBoxItem}, Mode=FindAncestor}}"
                                                            Value="True">
                                                        <Setter Property="Background" TargetName="ItemBorder"
                                                                Value="{Binding Path=SelectedBackgroundBrush}" />
                                                    </DataTrigger>
                                                </DataTemplate.Triggers>
                                            </DataTemplate>
                                        </ListBox.Resources>
                                    </ListBox>

                                    <!--<localScheduler:ServiceRecordScheduler x:Name="serviceRecordScheduler" TabIndex="1" Visibility="Visible" TextBlock.Foreground="Black"/>-->
                                </Grid>



                                <TextBlock Grid.Column="1" x:Name="txtServiceListCount"
                                        Text="{Binding Path=RecordCountInformationString}" VerticalAlignment="Bottom"
                                        Margin="5,0,5,3" Foreground="#FF2B508B" HorizontalAlignment="Left" FontSize="14" />
                                <StackPanel x:Name="stackPanelInfoText" Orientation="Horizontal" Grid.Column="1" VerticalAlignment="Bottom"
                                        HorizontalAlignment="Right">
									<TextBlock x:Name="textblock_link_pdfexport" Margin="5,0,5,3" FontSize="14">
                                        <Hyperlink x:Name="linkPdfExport" TargetName="_NewWindow" Foreground="#FF2B508B" RequestNavigate="LinkPdfExport_OnRequestNavigate">
                                            <Run Text="Drucken" />
                                        </Hyperlink>
                                    </TextBlock>
                                    <TextBlock x:Name="textblock_link" Margin="5,0,5,3" FontSize="14">
                                        <Hyperlink x:Name="linkExcelExport" TargetName="newWindow" Foreground="#FF2B508B"
                                                RequestNavigate="LinkExcelExportRequestNavigate">
                                            <Run Text="Excel Export" />
                                        </Hyperlink>
                                    </TextBlock>

									<Button Margin="5,0,5,0" Height="22" Content="Einträge umbuchen" Click="EintraegeUmbuchenBtn_Click" x:Name="Eintragumbuchunsbutton"></Button>
                                </StackPanel>

                                <Grid x:Name="punktebogenRootGrid" Grid.Column="2" >
                                    <Border Width="200" BorderBrush="Green"/>
                                </Grid>
                            </Grid>
                            
                            <Grid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Grid.RowSpan="2" Margin="0,3,0,0" Visibility="Collapsed" x:Name="wohnheimbuchungsGrid">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="50*" />
                                    <ColumnDefinition Width="50*" />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="*" />
                                </Grid.RowDefinitions>
                                
                                <Grid Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="*" />
                                    </Grid.ColumnDefinitions>

                                    <Label Grid.Column="0" Content="Wohnheim" Margin="0,0,3,3" />
                                    <ComboBox x:Name="wohnheimbuchungsWohnheimComboBox" Grid.Column="1" Width="150" Margin="0,0,3,3" ItemsSource="{Binding Path=AlleWohnheime}" SelectedItem="{Binding Path=SelectedWohnheimbuchung.Wohnheim, UpdateSourceTrigger=PropertyChanged}" SelectionChanged="WohnheimbuchungsWohnheimComboBox_OnSelectionChanged" />

                                    <Label Grid.Column="2" Content="Datum" Margin="0,0,3,3" />
                                    <dxe:DateEdit Grid.Column="3" x:Name="wohnheimbuchungsDateEdit" Height="23" Width="150" Margin="0,0,3,3" 
                                                  EditValueChanged="WohnheimbuchungsDateEdit_OnEditValueChanged"
                                                  EditValue="{Binding Mode=TwoWay, Path=SelectedWohnheimbuchung.Buchungsdatum}" MaskType="DateTimeAdvancingCaret"/>

                                    <!--<Label Grid.Column="4" Content="Kategorie" />
                                    <ComboBox Grid.Column="5" SelectedItem="{Binding Path=SelectedWohnheimbuchung.Category}"
                                              ItemsSource="{Binding Path=SelectedWohnheimbuchung.SortedCategories}"
                                              SelectedIndex="0" x:Name="combobox_category_wohnheimbuchung" Margin="3,0,3,3"
                                              Height="23" Width="150" />

                                    <Label Grid.Column="6" Content="Leistung" />
                                    <ComboBox Grid.Column="7" SelectedItem="{Binding Path=SelectedWohnheimbuchung.ServiceDescription}"
                                              HorizontalAlignment="Left"
                                              ItemsSource="{Binding Path=SelectedWohnheimbuchung.PossibleServiceDescriptions}"
                                              SelectedIndex="0" x:Name="combobox_services_wohnheimbuchung" Margin="3,0,3,3" Height="23" Width="150" />-->
                                </Grid>

                                <StackPanel Grid.Column="0" Grid.Row="1" Orientation="Horizontal">
                                    <Label Content="Ausgewählte Hilfepläne" FontSize="12" FontWeight="Bold" />
                                    <Button x:Name="btnAddSupportConcept" HorizontalAlignment="Right" Click="btnAddSupportConcept2Wohnheimbuchung_Click" Height="21" Width="45" Margin="0,0,0,3" ToolTip="Klient/in hinzufügen" IsEnabled="False">
                                        <StackPanel Orientation="Horizontal">
                                            <Grid Width="18" HorizontalAlignment="Center" VerticalAlignment="Center">
                                                <Line X1="4" X2="12" Y1="8" Y2="8" Fill="{x:Null}" Stroke="#FFFFFFFF" StrokeStartLineCap="Round" StrokeEndLineCap="Round" StrokeThickness="2" HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="16" />
                                                <Line X1="8" X2="8" Y1="4" Y2="12" Fill="{x:Null}" Stroke="#FFFFFFFF" StrokeStartLineCap="Round" StrokeEndLineCap="Round" StrokeThickness="2" HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="16" />
                                            </Grid>
                                            <Image Width="20" Source="/BeWoPlaner;component/Ressources/Icons/AnonymousUserDisabled.png" />
                                        </StackPanel>
                                    </Button>
                                </StackPanel>

                                <dxg:GridControl Grid.Column="0" Grid.Row="2" Margin="0,10,3,3" ItemsSource="{Binding Path=SelectedWohnheimbuchung.Wohnheimbuchung2Costbearer2SupportConceptList.VMList, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" x:Name="SupportConcept2WohnheimbuchungGridControl">
                                    <dxg:GridControl.Columns>
                                        <dxg:GridColumn FieldName="Notice" Header="" FixedWidth="True" Width="24" ReadOnly="True">
                                            <dxg:GridColumn.CellTemplate>
                                                <DataTemplate>
                                                    <Button Content="r" FontFamily="Webdings" Click="Button_deleteSupportConcept2WohnheimbuchungClick" Width="18" Height="18" VerticalAlignment="Center" />
                                                </DataTemplate>
                                            </dxg:GridColumn.CellTemplate>
                                        </dxg:GridColumn>
                                        <dxg:GridColumn AllowEditing="False" Header="Hilfeplan" FieldName="DetailString" Width="350" />
                                        <dxg:GridColumn Header="Von" FieldName="StartDate">
                                            <dxg:GridColumn.EditSettings>
                                                <dxe:DateSettings DisplayFormat="HH:mm" EditFormat="HH:mm" Mask="HH:mm" AllowNullInput="False" />
                                            </dxg:GridColumn.EditSettings>
                                        </dxg:GridColumn>
                                        <dxg:GridColumn Header="Bis" FieldName="EndDate">
                                            <dxg:GridColumn.EditSettings>
                                                <dxe:DateSettings DisplayFormat="HH:mm" EditFormat="HH:mm" Mask="HH:mm" AllowNullInput="False" />
                                            </dxg:GridColumn.EditSettings>
                                        </dxg:GridColumn>
                                        <dxg:GridColumn Header="Notiz" FieldName="Notice" />
                                    </dxg:GridControl.Columns>
                                    <dxg:GridControl.View>
                                        <dxg:TableView x:Name="customer2WohnheimbuchungTableView" AutoWidth="true" ShowGroupPanel="False" 
                                                       ShowGroupedColumns="false" ShowTotalSummary="False" NavigationStyle="Cell" />
                                    </dxg:GridControl.View>
                                </dxg:GridControl>

                                <StackPanel Grid.Column="1" Grid.Row="1" Orientation="Horizontal">
                                    <Label Content="Ausgewählte Mitarbeiter" FontSize="12" FontWeight="Bold" />
                                    <Button Grid.Row="0" x:Name="btnAddEmployee2Wohnheimbuchung" HorizontalAlignment="Right" Click="btnAddEmployee2Wohnheimbuchung_Click" Height="21" Width="21" Margin="0,0,0,3" ToolTip="Neuen Mitarbeiter hinzufügen" IsEnabled="False">
                                        <Grid Width="18" HorizontalAlignment="Center" VerticalAlignment="Center">
                                            <Line X1="4" X2="12" Y1="8" Y2="8" Fill="{x:Null}" Stroke="#FFFFFFFF" StrokeStartLineCap="Round" StrokeEndLineCap="Round" StrokeThickness="2" HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="16" />
                                            <Line X1="8" X2="8" Y1="4" Y2="12" Fill="{x:Null}" Stroke="#FFFFFFFF" StrokeStartLineCap="Round" StrokeEndLineCap="Round" StrokeThickness="2" HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="16" />
                                        </Grid>
                                    </Button>
                                </StackPanel>

                                <dxg:GridControl Grid.Column="1" Grid.Row="2" Margin="0,10,3,3" ItemsSource="{Binding SelectedWohnheimbuchung.EmployeeList.VMList, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" x:Name="Employee2WohnheimbuchungGridControl">
                                    <dxg:GridControl.Columns>
                                        <dxg:GridColumn FieldName="Notice" Header="" ReadOnly="True" FixedWidth="True" Width="24">
                                            <dxg:GridColumn.CellTemplate>
                                                <DataTemplate>
                                                        <Button Content="r" FontFamily="Webdings" Click="Button_Employee2WohnheimbuchungClick" Width="18" Height="18" VerticalAlignment="Center" />
                                                </DataTemplate>
                                            </dxg:GridColumn.CellTemplate>
                                        </dxg:GridColumn>
                                        <dxg:GridColumn AllowEditing="False" Header="Mitarbeiter" FieldName="Employee" />
                                        <dxg:GridColumn Header="Von" FieldName="StartDate" AllowEditing="True">
                                            <dxg:GridColumn.EditSettings>
                                                <dxe:DateSettings DisplayFormat="HH:mm" EditFormat="HH:mm" Mask="HH:mm" AllowNullInput="False" />
                                            </dxg:GridColumn.EditSettings>
                                        </dxg:GridColumn>
                                        <dxg:GridColumn Header="Bis" FieldName="EndDate" AllowEditing="True">
                                            <dxg:GridColumn.EditSettings>
                                                <dxe:DateSettings DisplayFormat="HH:mm" EditFormat="HH:mm" Mask="HH:mm" AllowNullInput="False" />
                                            </dxg:GridColumn.EditSettings>
                                        </dxg:GridColumn>
                                    </dxg:GridControl.Columns>
                                    <dxg:GridControl.View>
                                        <dxg:TableView x:Name="employee2WohnheimbuchungTableView"  AutoWidth="true" ShowGroupPanel="False" ShowGroupedColumns="false" ShowTotalSummary="False" NavigationStyle="Cell"/>
                                    </dxg:GridControl.View>
                                </dxg:GridControl>

                            </Grid>

                            <!-- Bedarfsmedikation -->
                            <Grid Grid.Row="1" Grid.Column="0" Grid.RowSpan="2" x:Name="BedarfsmedikationsGrid" Margin="0,3,0,0" Visibility="Collapsed">
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="250" />
                                        <ColumnDefinition Width="*" />
                                    </Grid.ColumnDefinitions>

                                    <Grid Margin ="3,-2,0,0" Grid.Column="0" VerticalAlignment="Stretch" x:Name="NewMedRecordGrid">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto" />
                                        </Grid.ColumnDefinitions>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto" />
                                            <RowDefinition Height="*" />
                                        </Grid.RowDefinitions>

                                        <localViewControls:CustomerSelectionControl x:Name="CustomerSelectionControl" Width="241"
                                            ItemSelected="CustomerSelectionControl_ItemSelected" Height="62" VerticalAlignment="Top"
                                            HorizontalContentAlignment="Stretch" HorizontalAlignment="Left" />

                                        <GroupBox Grid.Row="1" Grid.Column="0" Header="Neue Bedarfsmedikation" Style="{DynamicResource ObjectEditGroupBox}" Margin="0,0,0,-3">
                                            <Grid>
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="Auto" />
                                                    <ColumnDefinition Width="*" />
                                                </Grid.ColumnDefinitions>
                                                <Grid.RowDefinitions>
                                                    <RowDefinition Height="Auto" />
                                                    <RowDefinition Height="Auto" />
                                                    <RowDefinition Height="Auto" />
                                                    <RowDefinition Height="Auto" />
                                                    <RowDefinition Height="Auto" />
                                                    <RowDefinition Height="Auto" />
                                                    <RowDefinition Height="*" />
                                                </Grid.RowDefinitions>
                                                <Label Grid.Row="0" Grid.Column="0" Content="Mitarbeiter" />
                                                <uc:PopUpEdit IsReadOnly="True" x:Name="popupedit_employee_bedarfsmed"
                                                              DeleteButtonVisibility="Collapsed"
                                                              PopUpClick="PopupeditEmployeeBedarfsMedPopUpClick"
                                                              HorizontalAlignment="Stretch"
                                                              HorizontalContentAlignment="Stretch" Height="23" Grid.Column="1"
                                                              Grid.Row="0" Margin="3,0,3,3"
                                                              IsEnabled="{Binding Path=MedRecordCreationEnabled, UpdateSourceTrigger=PropertyChanged}"
                                                              Cursor="Arrow" PreviewMouseDoubleClick="Popupedit_employee_bedarfsmed_OnPreviewMouseDoubleClick"/>
                                                
                                                <Label Grid.Row="1" Grid.Column="0" Content="Bezeichnung" />
                                                <TextBox Grid.Row="1" Grid.Column="1" Margin="3,0,3,3" Height="23" Text="{val:ValidationBinding Path=BedarfsMedViewModel.NewVM.MedName, UpdateSourceTrigger=PropertyChanged}" 
                                                         IsEnabled="{Binding Path=MedRecordCreationEnabled, UpdateSourceTrigger=PropertyChanged}"
                                                         VerticalContentAlignment="Center" />
                                                
                                                <Label Grid.Row="2" Grid.Column="0" Content="Darreichungsform" />
                                                <dxe:ComboBoxEdit x:Name="DarrFormCBE" Grid.Row="2" ItemsSource="{val:ValidationBinding Path=AllDosageForms, UpdateSourceTrigger=PropertyChanged}" 
                                                                  EditValue="{Binding Path=BedarfsMedViewModel.NewVM.DosageForm, UpdateSourceTrigger=PropertyChanged}" 
                                                                  Grid.Column="1" Height="23" Margin="3,0,3,3" IsTextEditable="False" SelectedIndex="0"
                                                                  IsEnabled="{Binding Path=MedRecordCreationEnabled, UpdateSourceTrigger=PropertyChanged}" />
                                                
                                                <Label Grid.Row="3" Grid.Column="0" Content="Datum" />
                                                <dxe:DateEdit Grid.Column="1" Grid.Row="3" Margin="3,0,3,3" EditValue="{val:ValidationBinding Path=BedarfsMedViewModel.NewVM.MedDate, UpdateSourceTrigger=PropertyChanged}" 
                                                              x:Name="DatepickerNewDateBedarfsmedikation" Height="23" MaskType="DateTimeAdvancingCaret" IsEnabled="{Binding Path=MedRecordCreationEnabled, UpdateSourceTrigger=PropertyChanged}"
                                                              Mask="dd.MM.yyyy HH:mm" MaskUseAsDisplayFormat="True" />

                                                <Label Grid.Row="4" Grid.Column="0" Content="Notiz" />
                                                <TextBox Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="2" Width="242"
                                                         Text="{Binding Path=BedarfsMedViewModel.NewVM.Notice, UpdateSourceTrigger=PropertyChanged}" 
                                                         Height="250" IsEnabled="{Binding Path=MedRecordCreationEnabled, UpdateSourceTrigger=PropertyChanged}"
                                                         AcceptsReturn="True" VerticalScrollBarVisibility="Auto"
                                                          HorizontalScrollBarVisibility="Hidden" TextWrapping="Wrap"
                                                          AutoWordSelection="True" Visibility="Visible" Language="de-DE" SpellCheck.IsEnabled="True"/>

                                                <Button Grid.Row="6" Grid.Column="0" Grid.ColumnSpan="2" Content="Speichern" Margin="3" HorizontalAlignment="Right" VerticalAlignment="Bottom" Click="ButtonSaveMedRecord_Click"
                                                        security:DemandUserRight.EnabledDemands="CreateAll, MedRecordsAnlegen"/>
                                            </Grid>
                                        </GroupBox>
                                    </Grid>

                                    <!--<dxg:GridControl Grid.Column="1" Margin ="0,60,3,3" ItemsSource="{Binding Path=BedarfsMedViewModel.VMList}" x:Name="MedRecordGridControl">
                                        <dxg:GridControl.Columns>-->
                                    <dxb:BarManager Grid.Column="1" Margin ="0,60,3,3">
                                        <dxb:BarManager.Items>
                                            <dxb:BarButtonItem Name="dxEditButtonMedRecord"   Content="Eintrag bearbeiten" Glyph="..\..\Ressources\Icons\Symbol Edit.png" ItemClick="DxEditButtonMedRecord_OnItemClick"/>
                                            <dxb:BarButtonItem Name="dxDeleteButtonMedRecord" Content="Eintrag löschen"    Glyph="..\..\Ressources\Icons\Symbol Delete.png" ItemClick="DxDeleteButtonMedRecord_OnItemClick"/>
                                        </dxb:BarManager.Items>
                                        <dxg:GridControl x:Name="MedRecordGridControl" ItemsSource="{Binding Path=BedarfsMedViewModel.VMList}">
                                            <dxb:BarManager.DXContextMenu>
                                                <dxb:PopupMenuInfo Opened="PopupInfoMedRecord_OnOpened" >
                                                    <dxb:BarButtonItemLink BarItemName="dxEditButtonMedRecord" />
                                                    <dxb:BarButtonItemLink BarItemName="dxDeleteButtonMedRecord" />
                                                </dxb:PopupMenuInfo>
                                            </dxb:BarManager.DXContextMenu>
                                            <dxg:GridControl.Columns>
                                                <dxg:GridColumn Header="" FixedWidth="True" Width="24" ReadOnly="True">
                                                <dxg:GridColumn.CellTemplate>
                                                    <DataTemplate>
                                                        <Button Content="r" FontFamily="Webdings" Click="Button_deleteMedRecordClick" Width="18" Height="18" VerticalAlignment="Center" security:DemandUserRight.VisibleDemands="DeleteAll, MedRecordsLoeschen" />
                                                    </DataTemplate>
                                                </dxg:GridColumn.CellTemplate>
                                            </dxg:GridColumn>
                                            <dxg:GridColumn FieldName="Employee" Header="Mitarbeiter" />
                                            <dxg:GridColumn FieldName="MedName" Header="Bezeichnung" />
                                            <dxg:GridColumn FieldName="DosageForm" Header="Darreichungsform" />
                                            <dxg:GridColumn FieldName="MedDate" Header="Datum">
                                                <dxg:GridColumn.EditSettings>
                                                    <dxe:DateEditSettings DisplayFormat="dd.MM.yyyy HH:mm" MaskUseAsDisplayFormat="True" Mask="dd.MM.yyyy HH:mm"/>
                                                </dxg:GridColumn.EditSettings>
                                            </dxg:GridColumn>
                                            <dxg:GridColumn FieldName="Notice" Header="Notiz" />
                                        </dxg:GridControl.Columns>
                                        <dxg:GridControl.View>
                                            <dxg:TableView AutoWidth="True"
                                                           ShowGroupPanel="False"
                                                           ShowTotalSummary="False"
                                                           NavigationStyle="Row"
                                                           MouseDoubleClick="MedRecord_MouseDoubleClick"
                                                           ShowAutoFilterRow="False"/>
                                        </dxg:GridControl.View>
                                    </dxg:GridControl>
                                    </dxb:BarManager>
                                </Grid>
                            </Grid>
                        </Grid>
                        <Border Grid.Row="2" Grid.ColumnSpan="3" Height="40" Margin="0,10,0,0" VerticalAlignment="Stretch"
                                Background="#FF000000">
                            <Border.OpacityMask>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#19000000" Offset="0" />
                                    <GradientStop Color="#33FFFFFF" Offset="1" />
                                </LinearGradientBrush>
                            </Border.OpacityMask>
                        </Border>
                        <StackPanel Grid.Row="2" Orientation="Horizontal" VerticalAlignment="Center" Height="Auto"
                                Margin="5,10,0,0" HorizontalAlignment="Right" MouseEnter="Speicher_Schliessen_Button_OnMouseEnter">
                            <Button x:Name="btnSaveWohnheimbuchung" Content="Speichern" Margin="0,0,3,0" Visibility="Collapsed"
                                    Click="BtnSaveWohnheimbuchung_OnClick" Height="25" IsEnabled="False" />
                            <Button x:Name="btnClose" Content="Schließen" Margin="0,0,3,0"
                                    Command="ApplicationCommands.Close" Height="25" />
                        </StackPanel>
                    </Grid>
                    <Popup Margin="10" x:Name="popup_employee" StaysOpen="False" Placement="MousePoint" Width="400"
                            Height="400">
                        <localSearchView:EmployeeSearchView x:Name="employeeSearchView" ItemSelected="EmployeeSearchView_CustomerSelected" />
                    </Popup>
					<Popup Margin="10" x:Name="popup_textbausteine" StaysOpen="False" Placement="MousePoint" Width="400" Height="400">
						<localSearchView:TextbausteineSearchView x:Name="textbausteineSearchView" ItemSelected="TextbausteineSearchView_OnItemSelected" />
					</Popup>
                    <Popup x:Name="popupEmployees" StaysOpen="False" Placement="MousePoint" Width="350" Height="400">
                        <localSearchView:EmployeeSearchView ItemSelected="EmployeeSearchView_ItemSelected" x:Name="employeeForWohnheimbuchungSearchView" />
                    </Popup>
                    <Popup x:Name="popupSupportConcepts" StaysOpen="False" Placement="MousePoint" Width="400" Height="400">
                        <localSearchView:SupportConceptSearchView x:Name="supportConceptForWohnheimbuchungSearchView" ShowFilterPanel="True" ItemSelected="SupportConceptForWohnheimbuchungSearchView_ItemSelected" SearchMode="ActiveCostbearer2SupportConcepts" />
                    </Popup>
                    <!-- Bedarfsmedikation ItemSelected="CustomerSearchView_OnItemSelected" -->
                    <Popup x:Name="popupCustomers" StaysOpen="False" Placement="MousePoint" Width="400" Height="400">
                        <localSearchView:CustomerSearchView />
                    </Popup>
                    <Popup x:Name="popupMedRecordEmployees" StaysOpen="False" Placement="MousePoint" Width="400" Height="400">
                        <localSearchView:EmployeeSearchView x:Name="MedRecordEmployeeSearchView" ItemSelected="MedRecordEmployeeSearchView_OnItemSelected"></localSearchView:EmployeeSearchView>
                    </Popup>
                </Grid>
                    <!--</ScrollViewer>-->
            </GroupBox>
            <!--<Button x:Name="button_Fullscreen" HorizontalAlignment="Left" Margin="369,18,0,0" VerticalAlignment="Top" Width="66" Height="29" Content="Button" Click="button_Fullscreen_Click"/>-->
        </uc:ShadowChrome>
        <Border x:Name="popup_content" />
    </Grid>
</localView:BeWoView>