- Thread starter
- Admin
- #111
Solved, the solution was too stupid, so I didn't try before. The * also need to be replaced with 560 ... then the mask is workingI intentionally switched from Uniform to Fill, because the OpacityMask does not work for some reasons. The edges are always unrounded for audio covers with "uniform".
Code:
<Grid
xmlns="www.team-mediaportal.com/2008/mpf/directx"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:fanart="clr-namespace:MediaPortal.Extensions.UserServices.FanArtService.Client;assembly=FanArtService.Client"
xmlns:media="clr-namespace:MediaPortal.UiComponents.Media.Models.AspectWrappers;assembly=Media"
x:Name="MediaItemDetails" HorizontalAlignment="Right"
Width="560" Height="560">
<!--Margin="80,5,-15,17"-->
<!-- Rounded corners are applied by OpacityMask -->
<Grid.Resources>
<fanart:FanArtImageSourceConverter x:Key="FanArtImageSourceConverter"/>
<fanart:MediaItemAspectToBoolConverter x:Key="MediaItemAspectToBoolConverter" />
</Grid.Resources>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!-- Image-->
<Image Grid.Column="0" HorizontalAlignment="Right" Stretch="Uniform" Margin="0,0,0,0"
Source="{Binding Source={StaticResource FanArtBackgroundModel}, Path=ImageSource, Converter={StaticResource FanArtImageSourceConverter}, ConverterParameter=FanArt;560;560}"
FallbackSource="{Binding Source={StaticResource FanArtBackgroundModel},Path=MediaItem}"
OpacityMask="{ThemeResource HomeTileOpacityBrush}">
</Image>
</Grid>