<localView:BeWoView x:Class="BeWo.View.Navigation.CustomerNavigationView" 
                    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:localNavView="clr-namespace:BeWo.View.Navigation" Loaded="OnLoaded">
	<Grid>
		<Grid.Resources>
            <Style x:Key="CustomerDetailStyle" TargetType="{x:Type ListBoxItem}">
                <Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorLevel=1, AncestorType={x:Type ItemsControl}, Mode=FindAncestor}}" />
                <Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorLevel=1, AncestorType={x:Type ItemsControl}, Mode=FindAncestor}}" />
                <Setter Property="Margin" Value="0,2,0,0" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate>
                            <Grid>
                                <Border x:Name="ItemBorder" CornerRadius="5" MinHeight="30" Background="#FF000000">
                                    <Border.OpacityMask>
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                            <GradientStop Color="#19000000" Offset="0" />
                                            <GradientStop Color="#26000000" Offset="1" />
                                        </LinearGradientBrush>
                                    </Border.OpacityMask>
                                </Border>
                                <Border x:Name="ItemContent" CornerRadius="5" MinHeight="30">
                                    <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="5,3,5,3" OpacityMask="{x:Null}" SnapsToDevicePixels="True">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto" />
                                            <ColumnDefinition Width="Auto" SharedSizeGroup="CustomerDetailColumn" />
                                            <ColumnDefinition Width="*" />
                                            <ColumnDefinition Width="Auto" />
											<ColumnDefinition Width="Auto" />
                                        </Grid.ColumnDefinitions>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto" />
                                            <RowDefinition Height="*" />
                                        </Grid.RowDefinitions>
                                        <Image Grid.RowSpan="2" Source="..\..\Ressources\Icons\UserHomeMaleDisabled.png" Margin="0,0,5,0" Height="30" VerticalAlignment="Center" HorizontalAlignment="Stretch" Width="Auto" RenderTransformOrigin="0.5,0.5" Grid.Row="0" />
                                        <StackPanel Grid.Row="0" Grid.Column="1" Orientation="Horizontal">
                                            <TextBlock x:Name="txtDetail1" Text="{Binding Path=SimpleDescription}" FontSize="14" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" />
                                            <TextBlock x:Name="txtDetail2" Text="{Binding Path=DateOfBirthString}" Margin="6,0,0,0" FontSize="14" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" />
                                        </StackPanel>
                                        <StackPanel Grid.Column="1" Grid.Row="1" Orientation="Horizontal">
                                            <TextBlock x:Name="txtDetail3" Text="{Binding Path=AddressString}" FontSize="12" Foreground="#FFA0A0A0" FontFamily="Microsoft Sans Serif" />
                                        </StackPanel>
                                        <TextBlock Grid.Row="0" Grid.Column="2" x:Name="txtDetail4" Text="{Binding Path=CurrentEmployeeRole}" Margin="16,0,0,0" FontSize="14" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" />
                                        <TextBlock Grid.Column="2" Grid.Row="1" x:Name="txtDetail5" Text="{Binding Path=MainAttendant}" Margin="16,0,0,0" FontSize="14" Foreground="#FFA0A0A0" FontFamily="Microsoft Sans Serif" />

                                        <!--Image x:Name="imgArchiv" Grid.Row="0" Grid.Column="2" Visibility="Collapsed" Grid.RowSpan="2" Source="..\Ressources\Icons\Archiv.png" Margin="0,0,5,0" Height="30" VerticalAlignment="Center" HorizontalAlignment="Stretch" Width="Auto" RenderTransformOrigin="0.5,0.5" /-->
										<TextBlock VerticalAlignment="Center" Grid.Column="3" Grid.Row="0" Grid.RowSpan="2" Margin="0,0,3,0" Visibility="{Binding Path=IsDeleted, Converter={StaticResource ReactivationRight2VisibilityConverter}, ConverterParameter=Customer}">
                                            <Hyperlink TargetName="_NewWindow" Foreground="#FFFFFFFF" Click="Hyperlink_Reaktivieren_Click">Reaktivieren</Hyperlink>
										</TextBlock>
										<TextBlock VerticalAlignment="Center" Grid.Column="4" Grid.Row="0" Grid.RowSpan="2">
                                            <Hyperlink TargetName="_NewWindow" Foreground="#FFFFFFFF" NavigateUri="{Binding Converter={StaticResource CustomerDCPrintURLConverter}}" RequestNavigate="Hyperlink_OnRequestNavigate">Drucken</Hyperlink>
                                        </TextBlock>
                                    </Grid>
                                </Border>
                            </Grid>
                            <ControlTemplate.Triggers>
                                <DataTrigger Binding="{Binding Path=IsArchived}" Value="True">
                                    <Setter Property="Foreground" TargetName="txtDetail1" Value="#FF808080" />
                                    <Setter Property="Foreground" TargetName="txtDetail2" Value="#FF808080" />
                                    <Setter Property="Foreground" TargetName="txtDetail3" Value="#FF808080" />
                                    <Setter Property="Foreground" TargetName="txtDetail4" Value="#FF808080" />
                                    <Setter Property="Foreground" TargetName="txtDetail5" Value="#FF808080" />
                                </DataTrigger>
								<DataTrigger Binding="{Binding Path=IsDeleted}" Value="True">
									<Setter Property="Foreground" TargetName="txtDetail1" Value="#FFF97E7B" />
									<Setter Property="Foreground" TargetName="txtDetail2" Value="#FFF97E7B" />
									<Setter Property="Foreground" TargetName="txtDetail3" Value="#FFF97E7B" />
									<Setter Property="Foreground" TargetName="txtDetail4" Value="#FFF97E7B" />
									<Setter Property="Foreground" TargetName="txtDetail5" Value="#FFF97E7B" />
								</DataTrigger>
								<Trigger Property="IsMouseOver" Value="True">
                                    <Setter Property="OpacityMask" TargetName="ItemBorder">
                                        <Setter.Value>
                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                <GradientStop Color="#33000000" Offset="0" />
                                                <GradientStop Color="#66000000" Offset="1" />
                                            </LinearGradientBrush>
                                        </Setter.Value>
                                    </Setter>
                                </Trigger>
                                <Trigger Property="ListBoxItem.IsSelected" Value="True">
                                    <Setter Property="OpacityMask" TargetName="ItemBorder">
                                        <Setter.Value>
                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                <GradientStop Color="#99000000" Offset="0" />
                                                <GradientStop Color="#CC000000" Offset="1" />
                                            </LinearGradientBrush>
                                        </Setter.Value>
                                    </Setter>
                                </Trigger>
                                <MultiTrigger>
                                    <MultiTrigger.Conditions>
                                        <Condition Property="ListBoxItem.IsSelected" Value="True" />
                                        <Condition Property="Selector.IsSelectionActive" Value="False" />
                                    </MultiTrigger.Conditions>
                                    <Setter Property="OpacityMask" TargetName="ItemBorder">
                                        <Setter.Value>
                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                <GradientStop Color="#99000000" Offset="0" />
                                                <GradientStop Color="#B2000000" Offset="1" />
                                            </LinearGradientBrush>
                                        </Setter.Value>
                                    </Setter>
                                </MultiTrigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
			<DataTemplate x:Key="CustomerDetailInfoTemplate">
				<StackPanel>
					<TextBlock Margin="5" FontSize="14" Foreground="#FFD2D2D2" TextWrapping="Wrap" FontFamily="Microsoft Sans Serif" Text="{Binding CurrentSupportConcept}" />
					<ListView ItemsSource="{Binding SupportConceptInfos}" Margin="10 5 5 5" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" Background="{x:Null}" BorderBrush="{x:Null}">
						<ListView.ItemContainerStyle>
							<Style TargetType="{x:Type ListBoxItem}">
								<Setter Property="Focusable" Value="false" />
							</Style>
						</ListView.ItemContainerStyle>
						<ListView.Resources>
							<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent" />
							<SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="Transparent" />
						</ListView.Resources>
						<ListView.ItemTemplate>
							<DataTemplate>
								<Grid>
									<Border Margin="0 0 0 3" x:Name="ItemBorder" CornerRadius="5" MinHeight="30" Background="#FF000000">
										<Border.OpacityMask>
											<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
												<GradientStop Color="#19000000" Offset="0" />
												<GradientStop Color="#26000000" Offset="1" />
											</LinearGradientBrush>
										</Border.OpacityMask>
									</Border>
									<StackPanel Margin="5">
										<TextBlock Text="{Binding CostBearer, Converter={StaticResource StringFormatConverter}, ConverterParameter=Kostenträger: \{0\}}" FontSize="14" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" />
										<TextBlock FontSize="12" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" Margin="5 5 0 0" Text="{Binding ApprovedHours, Converter={StaticResource StringFormatConverter}, ConverterParameter=Genehmigte FLS: \{0:0.##\}}" />
										<TextBlock FontSize="12" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" Margin="5 2 0 0" Text="{Binding RecordedHours, Converter={StaticResource StringFormatConverter}, ConverterParameter=Geleistete FLS: \{0:0.##\}}" />
									</StackPanel>
								</Grid>
							</DataTemplate>
						</ListView.ItemTemplate>
					</ListView>
				</StackPanel>
			</DataTemplate>
		</Grid.Resources>
        <localNavView:MainNavigationView OpenMailMergeWindow="MainNavigationView_OnOpenMailMergeWindow" 
                                         x:Name="mainNavigationView" 
                                         MainGroupHeader="Klienten" 
                                         CreateNewObject="mainNavigationView_CreateNewObject" 
                                         OpenObject="mainNavigationView_OpenObject" 
                                         DeleteObject="mainNavigationView_DeleteObject" 
                                         ArchiveObject="mainNavigationView_ArchiveObject" 
                                         ExcelExport="mainNavigationView_ExcelExport" 
                                         DeleteDemands="DeleteAll, CustomerView_Delete" 
                                         CreateDemands="CreateAll, CustomerView_Create" 
                                         ShowDetailsPanel="True" 
                                         DetailPanelItemTemplate="{StaticResource CustomerDetailInfoTemplate}" 
                                         ContentGroupStyle="{StaticResource CustomerNavigationStyle}" 
                                         MainListItemStyle="{StaticResource CustomerDetailStyle}" 
                                         HistoryListItemStyle="{StaticResource SearchSimpleStyle}" 
                                         OnReloadData="MainNavigationView_OnReloadData"/>

	</Grid>
</localView:BeWoView>