Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -8,6 +8,8 @@

<Grid.Resources>
<fanart:FanArtImageSourceConverter x:Key="FanArtImageSourceConverter"/>
<ExpressionMultiValueConverter x:Key="ExpressionMultiValueConverter"/>

</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
@@ -16,33 +18,93 @@
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>

<Grid Grid.Row="0" Grid.Column="0" >
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>

<Label Grid.Row="0" Grid.Column="0" Margin="20,20,0,20" x:Name="DirectorsLabel" Content="Director(s): " Color="{ThemeResource TextColor}"/>
<Label Grid.Row="0" Grid.Column="1" Margin="20,20,0,20" x:Name="Directors" Content="{Binding VideoDirectors}" Wrap="True" Color="{ThemeResource TextColor}"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>

<Label Grid.Row="1" Grid.Column="0" Margin="20,20,0,20" x:Name="WritersLabel" Content="Writer(s): " Color="{ThemeResource TextColor}"/>
<Label Grid.Row="1" Grid.Column="1" Margin="20,20,0,20" x:Name="Writers" Content="{Binding VideoWriters}" Wrap="True" Color="{ThemeResource TextColor}"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>

<Label Grid.Row="2" Grid.Column="0" Margin="20,20,0,20" x:Name="ArtistsLabel" Content="Artist(s): " Color="{ThemeResource TextColor}"/>
<Label Grid.Row="2" Grid.Column="1" Margin="20,20,0,20" x:Name="Artists" Content="{Binding VideoArtists}" Wrap="True" Color="{ThemeResource TextColor}"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>

<Label Grid.Row="3" Grid.Column="0" Margin="20,20,0,20" x:Name="ActorsLabel" Content="Actor(s): " Color="{ThemeResource TextColor}"/>
<Label Grid.Row="3" Grid.Column="1" Margin="20,20,0,20" x:Name="Actors" Content="{Binding VideoActors}" Wrap="True" Color="{ThemeResource TextColor}"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>

</Grid>
<media:VideoAspectWrapper MediaItem="{Binding MediaItem}" Grid.Column="1" Grid.Row="0" Grid.RowSpan="2" Margin="20,5,20,-92">
<media:VideoAspectWrapper.Template>
<ControlTemplate>
<Grid Grid.Row="0" Grid.Column="0" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
<Grid.RowDefinitions>
<RowDefinition Height="50"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="25*"/>
<ColumnDefinition Width="4"/>
<ColumnDefinition Width="15*"/>
<ColumnDefinition Width="15*"/>
<ColumnDefinition Width="15*"/>
<ColumnDefinition Width="4"/>
<ColumnDefinition Width="15*"/>
<ColumnDefinition Width="15*"/>
</Grid.ColumnDefinitions>

<!--Label Grid.Row="0" Grid.Column="0" Margin="20,5,0,5" Content="{Binding AudioLanguages}" Color="{ThemeResource TextColor}"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/-->

<!--Label Grid.Row="0" Grid.Column="0" Margin="20,5,0,5" Content="{Binding AspectRatio}" Color="{ThemeResource TextColor}"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Label.Content>
<Binding Path="VideoBitRate" ContentStringFormat="{}{0:#}" />
</Label.Content>
</Label-->


<!--HeadLines-->
<Label Grid.Row="0" Grid.Column="0" Margin="0" Content="[Video.Title]" Color="{ThemeResource TextColor}"
HorizontalAlignment="Center" VerticalAlignment="Center">
</Label>
<Label Grid.Row="0" Grid.Column="2" Grid.ColumnSpan="3" Margin="0" Content="[Audio.Title]" Color="{ThemeResource TextColor}"
HorizontalAlignment="Center" VerticalAlignment="Center">
</Label>
<Label Grid.Row="0" Grid.Column="6" Grid.ColumnSpan="2" Margin="0" Content="[Subtitle.Title]" Color="{ThemeResource TextColor}"
HorizontalAlignment="Center" VerticalAlignment="Center">
</Label>

<!--Video Infos-->
<Label Grid.Row="2" Grid.Column="0" Margin="20,5,0,5" Content="{Binding VideoBitRate}" Color="{ThemeResource TextColor}"
HorizontalAlignment="Center" VerticalAlignment="Stretch">
<Label.Content>
<Binding Path="VideoBitRate" Converter="{StaticResource StringFormatConverter}" ConverterParameter="{}{0} kbps" />
</Label.Content>
</Label>

<Image Grid.Row="1" Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Stretch" Stretch="Uniform" Width="300" >
<Image.Source>
<Binding Path="VideoEncoding" Converter="{StaticResource SafeFilenameConverter}" ConverterParameter="{}Medialogos\video\{0}.png"/>
</Image.Source>
</Image>

<!--Separator-->
<Border Grid.Row="1" Grid.RowSpan="5" Grid.Column="1" BorderThickness="0" Background="White" Opacity="0.08"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />

<Border Grid.Row="1" Grid.RowSpan="5" Grid.Column="5" BorderThickness="0" Background="White" Opacity="0.08"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />

<!--Audio Infos-->
<ListView Grid.Row="1" Grid.RowSpan="5" Grid.Column="2" x:Name="AudioLanguageList" ItemsSource="{Binding AudioLanguages}"
HorizontalAlignment="Center" VerticalAlignment="Stretch"
Style="{ThemeResource AudioLanguageListViewStyle}" Margin="10,5,10,5" />

<ListView Grid.Row="1" Grid.RowSpan="5" Grid.Column="3" x:Name="AudioEncodingList" ItemsSource="{Binding Path=AudioEncoding, Converter={StaticResource StringSplitConverter}}"
HorizontalAlignment="Center" VerticalAlignment="Stretch"
Style="{ThemeResource AudioEncodingListViewStyle}" Margin="10,5,10,5" />

<Label Grid.Row="1" Grid.Column="4" Margin="10,5,10,5" Content="{Binding AudioBitRate}" Color="{ThemeResource TextColor}"
HorizontalAlignment="Center" VerticalAlignment="Center">
<Label.Content>
<Binding Path="AudioBitRate" Converter="{StaticResource StringFormatConverter}" ConverterParameter="{}{0} kbps"/>
</Label.Content>
</Label>

</Grid>
</ControlTemplate>
</media:VideoAspectWrapper.Template>
</media:VideoAspectWrapper>


</Grid>
@@ -24,11 +24,11 @@
<ColumnDefinition Width="420"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Row="0" Grid.Column="0" Orientation="Horizontal">
<RadioButton x:Name="General" Content="General" HorizontalAlignment="Center" VerticalAlignment="Center"
Style="{ThemeResource TabButtonStyle}" GroupName="Tab" IsChecked="True" />
<RadioButton x:Name="CastCrew" Content="Cast + Crew" HorizontalAlignment="Center" VerticalAlignment="Center"
<RadioButton x:Name="General" Content="[General.Title]" HorizontalAlignment="Center" VerticalAlignment="Center"
Style="{ThemeResource TabButtonStyle}" GroupName="Tab" IsChecked="True"/>
<RadioButton x:Name="CastCrew" Content="[CastCrew.Title]" HorizontalAlignment="Center" VerticalAlignment="Center"
Style="{ThemeResource TabButtonStyle}" GroupName="Tab" IsChecked="False"/>
<RadioButton x:Name="MediaInfo" Content="MediaInfo" HorizontalAlignment="Center" VerticalAlignment="Center"
<RadioButton x:Name="MediaInfo" Content="[MediaInfo.Title]" HorizontalAlignment="Center" VerticalAlignment="Center"
Style="{ThemeResource TabButtonStyle}" GroupName="Tab" IsChecked="False"/>
<Control>
<Control.IsVisible>
@@ -83,7 +83,7 @@
</Control.TemplateControl>
</Control>

<Control x:Name="CP_MovieMediaInfo" Grid.Row="1" Grid.Column="0" IsVisible="{Binding ElementName=CastCrew, Path=IsChecked, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" >
<Control x:Name="CP_MovieMediaInfo" Grid.Row="1" Grid.Column="0" IsVisible="{Binding ElementName=MediaInfo, Path=IsChecked, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" >
<!-->Control.IsVisible>
<MultiBinding Converter="{StaticResource MediaItemAspectToBoolConverter}">
<Binding Path="MediaItem" />
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<ResourceDictionary
xmlns="www.team-mediaportal.com/2008/mpf/directx"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>

<!-- Button background and effects-->
<ResourceWrapper x:Key="ButtonStrokeColor" Resource="#50FFFFFF"/>
<ResourceWrapper x:Key="ButtonFillColor" Resource="#20FFFFFF"/>

</ResourceDictionary>
@@ -17,7 +17,7 @@
<Storyboard x:Key="FocusedButtonStoryboard_Base" FillBehavior="HoldEnd">
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" FillBehavior="HoldEnd" Storyboard.TargetName="ButtonControlRectangle" Storyboard.TargetProperty="Opacity">
<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
<SplineDoubleKeyFrame KeyTime="00:00:00.1" Value="0.1"/>
<SplineDoubleKeyFrame KeyTime="00:00:00.1" Value="1"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>

@@ -361,8 +361,7 @@
<Rectangle x:Name="ButtonControlRectangle"
Opacity="0"
RadiusX="{ThemeResource ButtonControlRadiusX}" RadiusY="{ThemeResource ButtonControlRadiusY}"
Margin="0,0,0,0" Fill="#FFFFFF" Stroke="#213848" StrokeThickness="1">
<!--Margin="0,0,45,0" Fill="#284161" Stroke="#213848" StrokeThickness="1"-->
Margin="0,0,0,0" Fill="{ThemeResource ButtonFillColor}" Stroke="{ThemeResource ButtonStrokeColor}" StrokeThickness="1">
</Rectangle>
</ControlTemplate>
</Setter.Value>
@@ -16,7 +16,8 @@
<ResourceWrapper x:Key="FocusedButtonGradient3Color" Resource="#FF050F20"/>
<ResourceWrapper x:Key="FocusedButtonGradientLightColor" Resource="#FF0F3369"/>
<ResourceWrapper x:Key="FocusedButtonGradientDarkColor" Resource="#FF050F20"/>
<ResourceWrapper x:Key="ButtonStrokeColor" Resource="#00000000"/>
<ResourceWrapper x:Key="ButtonStrokeColor" Resource="#213848"/>
<ResourceWrapper x:Key="ButtonFillColor" Resource="#284161"/>
<ResourceWrapper x:Key="FocusedButtonGradientLighterColor" Resource="#FF959595"/>
<ResourceWrapper x:Key="PressedButtonGradientLight1Color" Resource="#FFB0B0B0"/>
<ResourceWrapper x:Key="PressedButtonGradientLight2Color" Resource="#FFA0A0A0"/>
@@ -538,7 +538,7 @@
<Setter Property="DataStringProvider" Value="{ThemeResource DefaultItemDataStringProvider}"/>
<Setter Property="ItemContainerStyle" Value="{ThemeResource DefaultMenuItemContainerStyle}"/>
</Style>

<!-- ListView style to be used in the content area of the screens -->
<Style x:Key="ContentsMenuListViewStyle" BasedOn="{ThemeResource MenuListViewStyle}">
<Setter Property="ItemTemplate" Value="{ThemeResource ContentsMenuItemDataTemplate}"/>
@@ -623,7 +623,7 @@
<ControlTemplate TargetType="{x:Type ListViewItem}">
<Button Style="{ThemeResource GroupTabHeaderButtonStyle}" Margin="0,0,16,16"
Command="{DynamicResource ResourceKey=Menu_Command}"
IsEnabled="{Binding Enabled}" SetFocus="{Binding Path=Selected,Mode=OneTime}">
IsEnabled="{Binding Enabled}">
</Button>
</ControlTemplate>
</Setter.Value>
@@ -658,22 +658,86 @@
</Trigger-->
</Style>

<!-- ListView style for MediaInfos in Currently Playing screen-->
<DataTemplate x:Key="AudioLanguageItemDataTemplate" DataType="{x:Type collections:ListItem}">
<WrapPanel Orientation="Horizontal" x:Name="ItemControl" >
<Image Stretch="Uniform" Height="80">
<Image.Source>
<Binding Converter="{StaticResource StringFormatConverter}" ConverterParameter="{}Medialogos\flags\{0}.png"/>
</Image.Source>
</Image>
</WrapPanel>
</DataTemplate>

<DataTemplate x:Key="AudioEncodingItemDataTemplate" DataType="{x:Type collections:ListItem}">
<WrapPanel Orientation="Horizontal" x:Name="ItemControl" >
<Image Stretch="Uniform" Height="80">
<Image.Source>
<Binding Converter="{StaticResource StringFormatConverter}" ConverterParameter="{}Medialogos\audio\{0}.png"/>
</Image.Source>
</Image>
</WrapPanel>
</DataTemplate>

<Style x:Key="AudioLanguageListViewStyle" TargetType="{x:Type ListView}" BasedOn="{ThemeResource DefaultListViewStyle}" >
<Setter Property="ItemTemplate" Value="{ThemeResource AudioLanguageItemDataTemplate}"/>
<Setter Property="DataStringProvider" Value=""/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListView}">
<ScrollViewer CanContentScroll="True" Margin="0"
HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<ItemsPresenter VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
</ScrollViewer>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

<Style x:Key="AudioEncodingListViewStyle" TargetType="{x:Type ListView}" BasedOn="{ThemeResource DefaultListViewStyle}" >
<Setter Property="ItemTemplate" Value="{ThemeResource AudioEncodingItemDataTemplate}"/>
<Setter Property="DataStringProvider" Value=""/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListView}">
<ScrollViewer CanContentScroll="True" Margin="0"
HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<ItemsPresenter VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
</ScrollViewer>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

<!-- Player control styles -->

<ControlTemplate x:Key="PlayerControlPoster">
<Grid x:Name="CoverGridContainer" IsVisible="{Binding ElementName=ItemTypeImage,Path=HasImage}">
<Grid.Width>
<Grid x:Name="CoverGridContainer" IsVisible="{Binding ElementName=ItemTypeImage,Path=HasImage}"
Width="{StaticResource MEDIA_POSTER_WIDTH}" Height="{StaticResource MEDIA_POSTER_HEIGHT}">
<!--Grid.Width>
<MultiBinding Converter="{StaticResource ExpressionMultiValueConverter}" ConverterParameter="{}{0}?{1}:{2}">
<Binding ElementName="ItemTypeImage" Path="HasImage"/>
<Binding Source="{StaticResource MEDIA_POSTER_WIDTH}" />
<Binding Source="0"/>
</MultiBinding>
</Grid.Width>
<Image Source="MediaItem_Shadow.png" Margin="-7,-4,-8,-6"/>
<Image x:Name="ItemTypeImage" Source="{Binding MediaItem}"
Width="{StaticResource MEDIA_POSTER_WIDTH}" Height="{StaticResource MEDIA_POSTER_HEIGHT}" Stretch="UniformToFill"
OpacityMask="{ThemeResource MediaItemsOpacityBrush}">
</Image>
</Grid.Width-->

<!-- SHADOW -->
<Control Style="{ThemeResource Shadow_3_18}" />
<!-- SHADOW -->

<Grid>
<Grid.OpacityMask>
<VisualBrush>
<VisualBrush.Visual>
<Border Name="mask" Background="White" CornerRadius="{StaticResource MediumRadius}" BorderThickness="0" BorderBrush="Black"/>
</VisualBrush.Visual>
</VisualBrush>
</Grid.OpacityMask>
<Image x:Name="ItemTypeImage" HorizontalAlignment="Center" VerticalAlignment="Center" Width="{StaticResource MEDIA_POSTER_WIDTH}"
Height="{StaticResource MEDIA_POSTER_HEIGHT}" Stretch="UniformToFill" FallbackSource="VideoLarge.png" Source="{Binding MediaItem}">
</Image>
</Grid>
</Grid>
</ControlTemplate>

@@ -223,4 +223,34 @@
</Setter>
</Style>

<Style x:Key="Shadow_3_28">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Grid Margin="-3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="28" />
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="28" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="28" />
<RowDefinition Height="*" />
<RowDefinition Height="28" />
</Grid.RowDefinitions>
<Image Grid.Row="0" Grid.Column="0" Stretch="Fill" Margin="0" Opacity="0.9" Source="shadow_00.png" />
<Image Grid.Row="1" Grid.Column="0" Stretch="Fill" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="0" Opacity="0.9" Source="shadow_10.png" />
<Image Grid.Row="2" Grid.Column="0" Stretch="Fill" Margin="0" Opacity="0.9" Source="shadow_20.png" />
<Image Grid.Row="0" Grid.Column="1" Stretch="Fill" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="0" Opacity="0.9" Source="shadow_01.png" />
<Image Grid.Row="1" Grid.Column="1" Stretch="Fill" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="0" Opacity="0.9" Source="shadow_11.png" />
<Image Grid.Row="2" Grid.Column="1" Stretch="Fill" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="0" Opacity="0.9" Source="shadow_21.png" />
<Image Grid.Row="0" Grid.Column="2" Stretch="Fill" Margin="0" Opacity="0.9" Source="shadow_02.png" />
<Image Grid.Row="1" Grid.Column="2" Stretch="Fill" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="0" Opacity="0.9" Source="shadow_12.png" />
<Image Grid.Row="2" Grid.Column="2" Stretch="Fill" Margin="0" Opacity="0.9" Source="shadow_22.png" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

</ResourceDictionary>
@@ -73,6 +73,7 @@
<Compile Include="Network\Netbios\NbNsStatistics.cs" />
<Compile Include="Network\Netbios\NbPacketSegmentBase.cs" />
<Compile Include="Process\ProcessExecutionResult.cs" />
<Compile Include="Screens\FormExtensions.cs" />
<Compile Include="Security\SafeProcessHandle.cs" />
<Compile Include="Security\SafeThreadHandle.cs" />
<Compile Include="Security\SafeTokenHandle.cs" />
@@ -0,0 +1,52 @@
#region Copyright (C) 2007-2015 Team MediaPortal

/*
Copyright (C) 2007-2015 Team MediaPortal
http://www.team-mediaportal.com
This file is part of MediaPortal 2
MediaPortal 2 is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
MediaPortal 2 is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with MediaPortal 2. If not, see <http://www.gnu.org/licenses/>.
*/

#endregion

using System.Windows.Forms;
using MediaPortal.Utilities.SystemAPI;

namespace MediaPortal.Utilities.Screens
{
public static class FormExtensions
{
/// <summary>
/// Helper method to activate the form. Usually <see cref="Form.Activate"/> does all we need, but on some systems the MP2-Client's window
/// is not being activated. In this case we need to call native methods to force it.
/// </summary>
public static void SafeActivate(this Form form)
{
if (form == Form.ActiveForm)
return;
form.Activate();
if (form != Form.ActiveForm)
{
// Make Mediaportal window focused
if (NativeMethods.SetForegroundWindow(form.Handle, true))
{
// no logging available here
}
}
}

}
}
@@ -352,6 +352,10 @@ private void SplashScreenLoad(object sender, EventArgs e)
{
SetFormLocationAndBackground(_backgroundImage);

// Force activation and foreground
this.SafeActivate();
BringToFront();

if (_fadeInDuration != TimeSpan.Zero)
{
_fadeMode = true;
@@ -45,6 +45,7 @@
using MediaPortal.UI.SkinEngine.Settings;
using MediaPortal.UI.SkinEngine.Utils;
using MediaPortal.Utilities.Process;
using MediaPortal.Utilities.Screens;
using MediaPortal.Utilities.SystemAPI;
using SharpDX.Direct3D9;
using Screen = MediaPortal.UI.SkinEngine.ScreenManagement.Screen;
@@ -318,7 +319,7 @@ protected void CheckTopMost(bool force = false)
TopMost = IsFullScreen && (force || this == ActiveForm);
if (force)
{
SafeActivate();
this.SafeActivate();
BringToFront();
}
#endif
@@ -409,7 +410,7 @@ private void RenderLoop()

public void Start()
{
SafeActivate();
this.SafeActivate();
CheckTopMost(true);
StartUI();
ServiceRegistration.Get<ILogger>().Debug("SkinEngine MainForm: Running");
@@ -495,7 +496,7 @@ public void SwitchMode(ScreenMode mode)
SkinContext.WindowSize = ClientSize;

Update();
SafeActivate();
this.SafeActivate();
CheckTopMost();

StartUI();
@@ -839,7 +840,7 @@ protected override void WndProc(ref Message m)
// Restore if minimized
Restore();
// Set active window
SafeActivate();
this.SafeActivate();
CheckTopMost();
return;
}
@@ -919,24 +920,6 @@ protected override void WndProc(ref Message m)
base.WndProc(ref m);
}

/// <summary>
/// Helper method to activate the form. Usually <see cref="Form.Activate"/> does all we need, but on some systems the MP2-Client's window
/// is not being activated. In this case we need to call native methods to force it.
/// </summary>
private void SafeActivate()
{
if (this == ActiveForm)
return;
Activate();
if (this != ActiveForm)
{
ServiceRegistration.Get<ILogger>().Info("SkinEngine MainForm: SafeActivate: Current form is not active one? Try to activate again...");
// Make Mediaportal window focused
if (NativeMethods.SetForegroundWindow(Handle, true))
ServiceRegistration.Get<ILogger>().Info("SkinEngine MainForm: Successfully switched focus.");
}
}

protected override void OnResizeEnd(EventArgs e)
{
// Also called on window movement
@@ -0,0 +1,58 @@
#region Copyright (C) 2007-2015 Team MediaPortal

/*
Copyright (C) 2007-2015 Team MediaPortal
http://www.team-mediaportal.com
This file is part of MediaPortal 2
MediaPortal 2 is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
MediaPortal 2 is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with MediaPortal 2. If not, see <http://www.gnu.org/licenses/>.
*/

#endregion

using System;
using System.Linq;

namespace MediaPortal.UI.SkinEngine.MpfElements.Converters
{
/// <summary>
/// Value converter which replaces invalid characters for filenames by <c>_</c>. This can be used to create filesystem conform names.
/// It also supports same formatting arguments as <see cref="StringFormatConverter"/>.
/// </summary>
/// <remarks>
/// This converter will often be used in XAML files. Note that in XAML, an attribute beginning with a <c>'{'</c> character
/// is interpreted as an invocation of a markup extension. So the expression "{0}" must be escaped like this:
/// <c>"{}{0}"</c>.
/// </remarks>
public class SafeFilenameConverter : AbstractSingleDirectionConverter
{
#region IValueConverter implementation

public override bool Convert(object val, Type targetType, object parameter, System.Globalization.CultureInfo culture, out object result)
{
result = null;
string filename = val as string;
if (filename == null)
return false;

filename = System.IO.Path.GetInvalidFileNameChars().Aggregate(filename, (current, invalidFileNameChar) => current.Replace(invalidFileNameChar, '_'));

var sfc = new StringFormatConverter();
return sfc.Convert(filename, targetType, parameter, culture, out result);
}

#endregion
}
}
@@ -0,0 +1,51 @@
#region Copyright (C) 2007-2015 Team MediaPortal

/*
Copyright (C) 2007-2015 Team MediaPortal
http://www.team-mediaportal.com
This file is part of MediaPortal 2
MediaPortal 2 is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
MediaPortal 2 is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with MediaPortal 2. If not, see <http://www.gnu.org/licenses/>.
*/

#endregion

using System;
using System.Linq;

namespace MediaPortal.UI.SkinEngine.MpfElements.Converters
{
/// <summary>
/// Value converter which splits the given string into a list of string parts.
/// </summary>
public class StringSplitConverter : AbstractSingleDirectionConverter
{
#region IValueConverter implementation

public override bool Convert(object val, Type targetType, object parameter, System.Globalization.CultureInfo culture, out object result)
{
result = null;
string stringVal = val as string;
if (stringVal == null)
return false;

string[] separator = string.IsNullOrEmpty(parameter as string) ? new[] { ",", ";" } : new[] { parameter as string };
result = stringVal.Split(separator, StringSplitOptions.RemoveEmptyEntries).Select(s => s.Trim()).ToList();
return true;
}

#endregion
}
}
@@ -317,6 +317,8 @@
<Compile Include="MpfElements\Converters\PriorityBindingConverter.cs" />
<Compile Include="MpfElements\Converters\ReferenceNotNull_BoolConverter.cs" />
<Compile Include="MpfElements\Converters\expr\Error.cs" />
<Compile Include="MpfElements\Converters\StringSplitConverter.cs" />
<Compile Include="MpfElements\Converters\SafeFilenameConverter.cs" />
<Compile Include="MpfElements\Converters\StringFormatConverter.cs" />
<Compile Include="MpfElements\EventManager.cs" />
<Compile Include="MpfElements\GlobalEventManager.cs" />
@@ -24,6 +24,8 @@
<DurationConverter x:Key="DurationConverter"/>
<PriorityBindingConverter x:Key="PriorityBindingConverter"/>
<StringFormatConverter x:Key="StringFormatConverter"/>
<SafeFilenameConverter x:Key="SafeFilenameConverter"/>
<StringSplitConverter x:Key="StringSplitConverter"/>

<!-- ******************* Screen/dialog animation storyboards ****************** -->