<UserControl x:Class="NexusShell.Views.NexusPhotosView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:models="clr-namespace:NexusShell.Models"
             PreviewKeyDown="Root_OnPreviewKeyDown"
             FontFamily="Segoe UI Variable Display, Segoe UI">
    <UserControl.Resources>
        <BooleanToVisibilityConverter x:Key="BoolVis"/>
        <LinearGradientBrush x:Key="NpAccentGradient" StartPoint="0,0" EndPoint="1,1">
            <GradientStop Color="#668A4FFF" Offset="0"/>
            <GradientStop Color="#4400D9FF" Offset="1"/>
        </LinearGradientBrush>

        <Style x:Key="NpIconPath" TargetType="Path">
            <Setter Property="Stretch" Value="Uniform"/>
            <Setter Property="Stroke" Value="#00D9FF"/>
            <Setter Property="StrokeThickness" Value="1.5"/>
            <Setter Property="Fill" Value="Transparent"/>
            <Setter Property="StrokeStartLineCap" Value="Round"/>
            <Setter Property="StrokeEndLineCap" Value="Round"/>
            <Setter Property="Width" Value="16"/>
            <Setter Property="Height" Value="16"/>
        </Style>

        <Style x:Key="NpGhostButton" TargetType="Button">
            <Setter Property="Height" Value="34"/>
            <Setter Property="MinWidth" Value="34"/>
            <Setter Property="Padding" Value="10,0"/>
            <Setter Property="Margin" Value="0,0,6,0"/>
            <Setter Property="Cursor" Value="Hand"/>
            <Setter Property="Foreground" Value="#E8F0FF"/>
            <Setter Property="Background" Value="#14081428"/>
            <Setter Property="BorderBrush" Value="#33FFFFFF"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Border x:Name="Root" CornerRadius="10"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Padding="{TemplateBinding Padding}">
                            <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter TargetName="Root" Property="Background" Value="#2800D9FF"/>
                                <Setter TargetName="Root" Property="BorderBrush" Value="#6600D9FF"/>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="False">
                                <Setter Property="Opacity" Value="0.35"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="NpNavButton" TargetType="Button">
            <Setter Property="Height" Value="38"/>
            <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
            <Setter Property="Padding" Value="10,0"/>
            <Setter Property="Margin" Value="0,0,0,3"/>
            <Setter Property="Cursor" Value="Hand"/>
            <Setter Property="Foreground" Value="#D8E6FF"/>
            <Setter Property="FontSize" Value="13"/>
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="BorderThickness" Value="0"/>
            <Setter Property="Command" Value="{Binding DataContext.NavigateSectionCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"/>
            <Setter Property="CommandParameter" Value="{Binding Section}"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Border x:Name="Root" CornerRadius="10" Background="{TemplateBinding Background}"
                                Padding="{TemplateBinding Padding}">
                            <ContentPresenter VerticalAlignment="Center"/>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter TargetName="Root" Property="Background" Value="#2200D9FF"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <DataTemplate x:Key="NpPhotoTileTemplate" DataType="{x:Type models:NexusPhotoGridItem}">
            <Border Width="{Binding DataContext.ThumbnailSize, RelativeSource={RelativeSource AncestorType=UserControl}}"
                    Margin="0,0,12,12" CornerRadius="14" BorderThickness="1"
                    BorderBrush="#22FFFFFF" Background="#12081228" Cursor="Hand"
                    MouseLeftButtonUp="PhotoTile_OnMouseLeftButtonUp">
                <Border.Style>
                    <Style TargetType="Border">
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding IsSelected}" Value="True">
                                <Setter Property="BorderBrush" Value="#AA00D9FF"/>
                                <Setter Property="Background" Value="#2200D9FF"/>
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                </Border.Style>
                <StackPanel>
                    <Border CornerRadius="12,12,0,0" ClipToBounds="True"
                            Height="{Binding DataContext.ThumbnailSize, RelativeSource={RelativeSource AncestorType=UserControl}}"
                            Background="#18000000">
                        <Grid>
                            <Image Source="{Binding Thumbnail}" Stretch="UniformToFill"/>
                            <Border Background="#22000000" VerticalAlignment="Bottom" Padding="8,4">
                                <TextBlock Text="{Binding Photo.FileName}" Foreground="#E8F0FF" FontSize="11"
                                           TextTrimming="CharacterEllipsis"/>
                            </Border>
                        </Grid>
                    </Border>
                </StackPanel>
            </Border>
        </DataTemplate>
    </UserControl.Resources>

    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="210"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="280"/>
        </Grid.ColumnDefinitions>

        <!-- LEFT NAV -->
        <Border Grid.Column="0" Margin="0,0,12,0" CornerRadius="16" Background="#12081228" BorderBrush="#22FFFFFF" BorderThickness="1" Padding="10">
            <DockPanel LastChildFill="True">
                <TextBlock DockPanel.Dock="Top" Text="Bibliotek" Foreground="#8CA3C7" FontSize="11" FontWeight="SemiBold" Margin="8,4,0,10"/>
                <ListBox ItemsSource="{Binding NavItems}" Background="Transparent" BorderThickness="0">
                    <ListBox.ItemTemplate>
                        <DataTemplate DataType="{x:Type models:NexusPhotoNavItem}">
                            <Button Style="{StaticResource NpNavButton}">
                                <StackPanel Orientation="Horizontal">
                                    <Path Data="{Binding IconPath}" Style="{StaticResource NpIconPath}" Margin="0,0,10,0"/>
                                    <TextBlock Text="{Binding Label}" VerticalAlignment="Center"/>
                                </StackPanel>
                            </Button>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </DockPanel>
        </Border>

        <!-- CENTER -->
        <Grid Grid.Column="1">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>

            <Border Grid.Row="0" Margin="0,0,0,10" CornerRadius="14" Background="#12081228" BorderBrush="#22FFFFFF" BorderThickness="1" Padding="12,10">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <StackPanel Grid.Row="0" Orientation="Horizontal" Margin="0,0,0,8">
                        <Button Style="{StaticResource NpGhostButton}" Command="{Binding RefreshCommand}" ToolTip="Opdater">
                            <Path Data="M12,4 A8,8 0 1,1 4,12 M4,12 L4,8 M4,12 L8,12" Style="{StaticResource NpIconPath}"/>
                        </Button>
                        <Button Style="{StaticResource NpGhostButton}" Command="{Binding ZoomGridOutCommand}" ToolTip="Mindre miniaturer">
                            <Path Data="M10,4 A6,6 0 1,0 10,16 A6,6 0 1,0 10,4 M7,10 L13,10" Style="{StaticResource NpIconPath}"/>
                        </Button>
                        <Button Style="{StaticResource NpGhostButton}" Command="{Binding ZoomGridInCommand}" ToolTip="Større miniaturer">
                            <Path Data="M10,4 A6,6 0 1,0 10,16 A6,6 0 1,0 10,4 M16,16 L20,20 M13,10 L7,10 M10,7 L10,13" Style="{StaticResource NpIconPath}"/>
                        </Button>
                        <TextBlock Text="{Binding ZoomLevelLabel}" Foreground="#8CA3C7" VerticalAlignment="Center" Margin="4,0,12,0"/>
                        <Button Style="{StaticResource NpGhostButton}" Command="{Binding StartSlideshowCommand}" ToolTip="Diasshow">
                            <StackPanel Orientation="Horizontal">
                                <Path Data="M8,6 L18,12 L8,18 Z" Style="{StaticResource NpIconPath}" Margin="0,0,6,0"/>
                                <TextBlock Text="Diasshow" VerticalAlignment="Center"/>
                            </StackPanel>
                        </Button>
                    </StackPanel>
                    <Grid Grid.Row="1">
                        <TextBox Text="{Binding SearchQuery, UpdateSourceTrigger=PropertyChanged}" Height="34"
                                 VerticalContentAlignment="Center" Padding="34,0,28,0" FontSize="13"
                                 Background="#18000000" Foreground="#FFFFFF" BorderBrush="#33FFFFFF" BorderThickness="1"
                                 CaretBrush="#00D9FF"/>
                        <Path Data="M10,4 A6,6 0 1,0 10,16 A6,6 0 1,0 10,4 M16,16 L20,20"
                              Style="{StaticResource NpIconPath}" HorizontalAlignment="Left" Margin="10,0,0,0" IsHitTestVisible="False"/>
                        <Button Style="{StaticResource NpGhostButton}" HorizontalAlignment="Right" Margin="0"
                                Command="{Binding ClearSearchCommand}" Background="Transparent" BorderThickness="0">
                            <Path Data="M8,8 L16,16 M16,8 L8,16" Style="{StaticResource NpIconPath}"/>
                        </Button>
                    </Grid>
                </Grid>
            </Border>

            <Border Grid.Row="1" CornerRadius="16" Background="#0C081428" BorderBrush="#22FFFFFF" BorderThickness="1" Padding="14">
                <Grid>
                    <!-- Library home -->
                    <ScrollViewer VerticalScrollBarVisibility="Auto"
                                  Visibility="{Binding IsLibraryHome, Converter={StaticResource BoolVis}}">
                        <ItemsControl ItemsSource="{Binding HomeSections}">
                            <ItemsControl.ItemTemplate>
                                <DataTemplate DataType="{x:Type models:NexusPhotoHomeSection}">
                                    <StackPanel Margin="0,0,0,18">
                                        <StackPanel Orientation="Horizontal" Margin="0,0,0,10">
                                            <Path Data="{Binding IconPath}" Style="{StaticResource NpIconPath}" Margin="0,0,8,0"/>
                                            <TextBlock Text="{Binding Title}" Foreground="#FFFFFF" FontSize="15" FontWeight="SemiBold"/>
                                        </StackPanel>
                                        <ItemsControl ItemsSource="{Binding Items}">
                                            <ItemsControl.ItemsPanel>
                                                <ItemsPanelTemplate>
                                                    <WrapPanel/>
                                                </ItemsPanelTemplate>
                                            </ItemsControl.ItemsPanel>
                                            <ItemsControl.ItemTemplate>
                                                <DataTemplate DataType="{x:Type models:NexusPhotoGridItem}">
                                                    <Border Width="160" Height="160" Margin="0,0,12,12" CornerRadius="12"
                                                            BorderBrush="#22FFFFFF" Background="#12081228" Cursor="Hand"
                                                            MouseLeftButtonUp="HomeTile_OnMouseLeftButtonUp">
                                                        <Grid>
                                                            <Image Source="{Binding Thumbnail}" Stretch="UniformToFill"/>
                                                            <Border Background="#88000000" VerticalAlignment="Bottom" Padding="8,6">
                                                                <TextBlock Text="{Binding Photo.FileName}" Foreground="#FFFFFF" FontSize="10.5"
                                                                           TextTrimming="CharacterEllipsis"/>
                                                            </Border>
                                                        </Grid>
                                                    </Border>
                                                </DataTemplate>
                                            </ItemsControl.ItemTemplate>
                                        </ItemsControl>
                                    </StackPanel>
                                </DataTemplate>
                            </ItemsControl.ItemTemplate>
                        </ItemsControl>
                    </ScrollViewer>

                    <!-- Folder browser -->
                    <ScrollViewer VerticalScrollBarVisibility="Auto"
                                  Visibility="{Binding IsFolderBrowser, Converter={StaticResource BoolVis}}">
                        <ItemsControl ItemsSource="{Binding FolderItems}">
                            <ItemsControl.ItemTemplate>
                                <DataTemplate DataType="{x:Type models:NexusPhotoFolderSummary}">
                                    <Border Margin="0,0,0,8" CornerRadius="12" Background="#12081228" BorderBrush="#22FFFFFF"
                                            BorderThickness="1" Padding="14,12" Cursor="Hand"
                                            MouseLeftButtonUp="FolderRow_OnMouseLeftButtonUp">
                                        <Grid>
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="Auto"/>
                                                <ColumnDefinition Width="*"/>
                                                <ColumnDefinition Width="Auto"/>
                                            </Grid.ColumnDefinitions>
                                            <Path Grid.Column="0" Data="M4,6 L10,6 L12,8 L20,8 L20,18 L4,18 Z"
                                                  Style="{StaticResource NpIconPath}" Margin="0,0,12,0"/>
                                            <StackPanel Grid.Column="1">
                                                <TextBlock Text="{Binding Label}" Foreground="#FFFFFF" FontWeight="SemiBold"/>
                                                <TextBlock Text="{Binding FolderPath}" Foreground="#8CA3C7" FontSize="11"
                                                           TextTrimming="CharacterEllipsis" Margin="0,2,0,0"/>
                                            </StackPanel>
                                            <TextBlock Grid.Column="2" Text="{Binding PhotoCount, StringFormat={}{0} billeder}"
                                                       Foreground="#00D9FF" VerticalAlignment="Center"/>
                                        </Grid>
                                    </Border>
                                </DataTemplate>
                            </ItemsControl.ItemTemplate>
                        </ItemsControl>
                    </ScrollViewer>

                    <!-- Photo grid -->
                    <ScrollViewer VerticalScrollBarVisibility="Auto"
                                  Visibility="{Binding IsGridVisible, Converter={StaticResource BoolVis}}">
                        <ItemsControl ItemsSource="{Binding GridItems}">
                            <ItemsControl.ItemsPanel>
                                <ItemsPanelTemplate>
                                    <WrapPanel/>
                                </ItemsPanelTemplate>
                            </ItemsControl.ItemsPanel>
                            <ItemsControl.ItemTemplate>
                                <StaticResource ResourceKey="NpPhotoTileTemplate"/>
                            </ItemsControl.ItemTemplate>
                        </ItemsControl>
                    </ScrollViewer>
                </Grid>
            </Border>

            <TextBlock Grid.Row="1" Text="{Binding StatusMessage}" VerticalAlignment="Bottom" HorizontalAlignment="Left"
                       Margin="18,0,0,8" Foreground="#8CA3C7" FontSize="11" IsHitTestVisible="False"/>
        </Grid>

        <!-- RIGHT METADATA -->
        <Border Grid.Column="2" Margin="12,0,0,0" CornerRadius="16" Background="#12081228" BorderBrush="#22FFFFFF" BorderThickness="1" Padding="16">
            <ScrollViewer VerticalScrollBarVisibility="Auto">
                <StackPanel>
                    <TextBlock Text="Forhåndsvisning" Foreground="#FFFFFF" FontSize="15" FontWeight="SemiBold" Margin="0,0,0,12"/>
                    <Border Height="180" CornerRadius="12" Background="#18000000" Margin="0,0,0,14" ClipToBounds="True">
                        <Image Source="{Binding SelectedGridItem.Thumbnail}" Stretch="Uniform"/>
                    </Border>
                    <Button Style="{StaticResource NpGhostButton}" Margin="0,0,0,14"
                            Command="{Binding ToggleFavoriteCommand}" HorizontalAlignment="Left">
                        <StackPanel Orientation="Horizontal">
                            <Path Data="M12,20 C12,20 4,14 4,9 A3,3 0 0,1 12,7 A3,3 0 0,1 20,9 C20,14 12,20 12,20"
                                  Style="{StaticResource NpIconPath}" Margin="0,0,8,0"/>
                            <TextBlock Text="Favorit" VerticalAlignment="Center"/>
                        </StackPanel>
                    </Button>
                    <TextBlock Text="Metadata" Foreground="#8CA3C7" FontSize="11" FontWeight="SemiBold" Margin="0,0,0,8"/>
                    <TextBlock Text="{Binding MetadataState.FileName}" Foreground="#FFFFFF" FontWeight="SemiBold" TextWrapping="Wrap" Margin="0,0,0,10"/>
                    <Grid Margin="0,0,0,6">
                        <Grid.ColumnDefinitions><ColumnDefinition Width="90"/><ColumnDefinition Width="*"/></Grid.ColumnDefinitions>
                        <TextBlock Text="Størrelse" Foreground="#8CA3C7"/><TextBlock Grid.Column="1" Text="{Binding MetadataState.SizeLabel}" Foreground="#E8F0FF"/>
                    </Grid>
                    <Grid Margin="0,0,0,6">
                        <Grid.ColumnDefinitions><ColumnDefinition Width="90"/><ColumnDefinition Width="*"/></Grid.ColumnDefinitions>
                        <TextBlock Text="Oprettet" Foreground="#8CA3C7"/><TextBlock Grid.Column="1" Text="{Binding MetadataState.CreatedLabel}" Foreground="#E8F0FF" TextWrapping="Wrap"/>
                    </Grid>
                    <Grid Margin="0,0,0,6">
                        <Grid.ColumnDefinitions><ColumnDefinition Width="90"/><ColumnDefinition Width="*"/></Grid.ColumnDefinitions>
                        <TextBlock Text="Ændret" Foreground="#8CA3C7"/><TextBlock Grid.Column="1" Text="{Binding MetadataState.ModifiedLabel}" Foreground="#E8F0FF" TextWrapping="Wrap"/>
                    </Grid>
                    <Grid Margin="0,0,0,6">
                        <Grid.ColumnDefinitions><ColumnDefinition Width="90"/><ColumnDefinition Width="*"/></Grid.ColumnDefinitions>
                        <TextBlock Text="Opløsning" Foreground="#8CA3C7"/><TextBlock Grid.Column="1" Text="{Binding MetadataState.ResolutionLabel}" Foreground="#E8F0FF"/>
                    </Grid>
                    <Grid Margin="0,0,0,6">
                        <Grid.ColumnDefinitions><ColumnDefinition Width="90"/><ColumnDefinition Width="*"/></Grid.ColumnDefinitions>
                        <TextBlock Text="Format" Foreground="#8CA3C7"/><TextBlock Grid.Column="1" Text="{Binding MetadataState.Format}" Foreground="#E8F0FF"/>
                    </Grid>
                    <Grid Margin="0,0,0,6">
                        <Grid.ColumnDefinitions><ColumnDefinition Width="90"/><ColumnDefinition Width="*"/></Grid.ColumnDefinitions>
                        <TextBlock Text="Mappe" Foreground="#8CA3C7"/><TextBlock Grid.Column="1" Text="{Binding MetadataState.FolderLabel}" Foreground="#E8F0FF" TextWrapping="Wrap"/>
                    </Grid>
                </StackPanel>
            </ScrollViewer>
        </Border>

        <!-- LIGHTBOX -->
        <Grid Grid.ColumnSpan="3" Background="#D9000000"
              Visibility="{Binding IsViewerOpen, Converter={StaticResource BoolVis}}"
              MouseWheel="ViewerOverlay_OnMouseWheel">
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border Grid.Row="0" Margin="40">
                <Image Source="{Binding ViewerImageSource}" HorizontalAlignment="Center" VerticalAlignment="Center">
                    <Image.Style>
                        <Style TargetType="Image">
                            <Setter Property="Stretch" Value="Uniform"/>
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding ViewerZoomMode}" Value="Fill">
                                    <Setter Property="Stretch" Value="UniformToFill"/>
                                </DataTrigger>
                                <DataTrigger Binding="{Binding ViewerZoomMode}" Value="ActualSize">
                                    <Setter Property="Stretch" Value="None"/>
                                </DataTrigger>
                            </Style.Triggers>
                        </Style>
                    </Image.Style>
                </Image>
            </Border>
            <Border Grid.Row="1" Background="#CC081428" Padding="16,12" BorderBrush="#4400D9FF" BorderThickness="0,1,0,0">
                <Grid>
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                        <Button Style="{StaticResource NpGhostButton}" Command="{Binding ViewerPreviousCommand}">
                            <StackPanel Orientation="Horizontal">
                                <Path Data="M14,6 L8,12 L14,18" Style="{StaticResource NpIconPath}" Margin="0,0,6,0"/>
                                <TextBlock Text="Forrige" VerticalAlignment="Center"/>
                            </StackPanel>
                        </Button>
                        <Button Style="{StaticResource NpGhostButton}" Command="{Binding ViewerNextCommand}">
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Text="Næste" VerticalAlignment="Center" Margin="0,0,6,0"/>
                                <Path Data="M10,6 L16,12 L10,18" Style="{StaticResource NpIconPath}"/>
                            </StackPanel>
                        </Button>
                        <Button Style="{StaticResource NpGhostButton}" Command="{Binding ViewerZoomCommand}">
                            <StackPanel Orientation="Horizontal">
                                <Path Data="M10,4 A6,6 0 1,0 10,16 A6,6 0 1,0 10,4 M16,16 L20,20 M13,10 L7,10 M10,7 L10,13"
                                      Style="{StaticResource NpIconPath}" Margin="0,0,6,0"/>
                                <TextBlock Text="{Binding ViewerZoomLabel, StringFormat=Zoom {0}}" VerticalAlignment="Center"/>
                            </StackPanel>
                        </Button>
                        <Button Style="{StaticResource NpGhostButton}" Command="{Binding ViewerInfoCommand}">
                            <StackPanel Orientation="Horizontal">
                                <Path Data="M12,4 A8,8 0 1,0 12,20 A8,8 0 1,0 12,4 M12,10 L12,16 M12,8 L12,8"
                                      Style="{StaticResource NpIconPath}" Margin="0,0,6,0"/>
                                <TextBlock Text="Info" VerticalAlignment="Center"/>
                            </StackPanel>
                        </Button>
                        <TextBlock Text="{Binding ViewerPositionLabel}" Foreground="#8CA3C7" VerticalAlignment="Center" Margin="12,0,0,0"/>
                    </StackPanel>
                    <Button Style="{StaticResource NpGhostButton}" HorizontalAlignment="Right"
                            Command="{Binding ViewerCloseCommand}" Content="Luk"/>
                </Grid>
            </Border>
            <Border HorizontalAlignment="Right" VerticalAlignment="Top" Margin="24" Width="260"
                    CornerRadius="12" Background="#EE081428" BorderBrush="#4400D9FF" BorderThickness="1" Padding="14"
                    Visibility="{Binding ViewerShowInfo, Converter={StaticResource BoolVis}}">
                <StackPanel DataContext="{Binding ViewerMetadata}">
                    <TextBlock Text="{Binding FileName}" Foreground="#FFFFFF" FontWeight="SemiBold" TextWrapping="Wrap" Margin="0,0,0,8"/>
                    <TextBlock Text="{Binding ResolutionLabel, StringFormat=Opløsning: {0}}" Foreground="#E8F0FF" Margin="0,0,0,4"/>
                    <TextBlock Text="{Binding SizeLabel, StringFormat=Størrelse: {0}}" Foreground="#E8F0FF" Margin="0,0,0,4"/>
                    <TextBlock Text="{Binding Format, StringFormat=Format: {0}}" Foreground="#E8F0FF" Margin="0,0,0,4"/>
                    <TextBlock Text="{Binding FolderLabel, StringFormat=Mappe: {0}}" Foreground="#8CA3C7" TextWrapping="Wrap"/>
                </StackPanel>
            </Border>
        </Grid>

        <!-- SLIDESHOW -->
        <Grid Grid.ColumnSpan="3" Background="#F5000000"
              Visibility="{Binding IsSlideshowActive, Converter={StaticResource BoolVis}}">
            <Image Source="{Binding SlideshowImageSource}" Stretch="Uniform"/>
            <Border VerticalAlignment="Bottom" Background="#AA081428" Padding="20,14">
                <Grid>
                    <TextBlock Text="{Binding SlideshowPositionLabel}" Foreground="#FFFFFF" FontSize="14" HorizontalAlignment="Center"/>
                    <Button Style="{StaticResource NpGhostButton}" HorizontalAlignment="Right"
                            Command="{Binding SlideshowCloseCommand}" Content="Luk (Esc)"/>
                </Grid>
            </Border>
        </Grid>
    </Grid>
</UserControl>
