<UserControl
    x:Class="JumpPoint.Uwp.Controls.AttributeIcon"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:JumpPoint.Uwp.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:properties="using:JumpPoint.Uwp.Converters.Properties"
             xmlns:conv="using:JumpPoint.Uwp.Converters"
             mc:Ignorable="d"
    BorderThickness="1"
    Padding="1"
    d:DesignHeight="300"
    d:DesignWidth="400">

    <UserControl.Resources>
        <properties:AttributeIconConverter x:Key="AttributeIconConverter" />
    </UserControl.Resources>

    <Image x:Name="image"
           Width="{x:Bind IconWidth, Mode=OneWay}"
           Height="{x:Bind IconHeight, Mode=OneWay}"
           Margin="0,0,8,0"
           ToolTipService.ToolTip="{x:Bind Attribute, Converter={StaticResource HumanizerConverter}}">
        <Image.Source>
            <BitmapImage DecodePixelWidth="{x:Bind IconWidth, Mode=OneWay}"
                         DecodePixelHeight="{x:Bind IconHeight, Mode=OneWay}"
                         DecodePixelType="Logical"
                         UriSource="{x:Bind Attribute, Converter={StaticResource AttributeIconConverter}}" />
        </Image.Source>
    </Image>
</UserControl>
