<UserControl x:Class="WpfExtended.Tests.Controls.CaptionedImage"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:WpfExtended.Tests.Controls"
             mc:Ignorable="d" 
             x:Name="_this"
             d:DesignHeight="450" d:DesignWidth="800">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"></RowDefinition>
            <RowDefinition Height="auto"></RowDefinition>
        </Grid.RowDefinitions>
        <Image Source="{Binding ElementName=_this, Path=ImageSource, Mode=OneWay}" Stretch="Fill"
               Effect="{Binding ElementName=_this, Path=ImageEffect, Mode=OneWay}"></Image>
        <TextBlock HorizontalAlignment="Center" FontSize="12" Foreground="{Binding ElementName=_this, Path=Foreground, Mode=OneWay}"
                   Text="{Binding ElementName=_this, Path=Caption, Mode=OneWay}" Grid.Row="1" TextWrapping="Wrap"></TextBlock>
    </Grid>
</UserControl>
