<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Bili.App.Controls">

    <Style TargetType="local:BannerItem">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:BannerItem">
                    <local:CardPanel x:Name="RootPanel" Style="{TemplateBinding CardStyle}">
                        <Grid CornerRadius="{StaticResource ControlCornerRadius}">
                            <local:CommonImageEx
                                x:Name="BannerImage"
                                AutomationProperties.Name="{TemplateBinding Title}"
                                MinWidth="300"
                                MinHeight="{TemplateBinding MinImageHeight}"
                                MaxHeight="{TemplateBinding MaxImageHeight}"
                                VerticalAlignment="Stretch"
                                DecodePixelWidth="500"
                                ImageUrl="{TemplateBinding Source}"
                                IsTabStop="False"
                                Stretch="UniformToFill">
                                <ToolTipService.ToolTip>
                                    <ToolTip Content="{TemplateBinding Title}" IsEnabled="{TemplateBinding IsTooltipEnabled}" />
                                </ToolTipService.ToolTip>
                            </local:CommonImageEx>
                        </Grid>
                    </local:CardPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
