<UserControl
    x:Class="Bili.Workspace.Controls.Community.UserAvatar"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:app="using:Bili.Workspace.Controls.App"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:local="using:Bili.Workspace.Controls.Community"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    d:DesignHeight="300"
    d:DesignWidth="400"
    IsTabStop="False"
    mc:Ignorable="d">

    <Button
        Width="{x:Bind Width, Mode=OneWay}"
        Height="{x:Bind Height, Mode=OneWay}"
        Padding="0"
        Background="Transparent"
        BorderThickness="0"
        Click="OnClick"
        Command="{x:Bind Command, Mode=OneWay}">
        <Button.Resources>
            <SolidColorBrush x:Key="ButtonBackgroundPointerOver" Color="Transparent" />
            <SolidColorBrush x:Key="ButtonBackgroundPressed" Color="Transparent" />
            <SolidColorBrush x:Key="ButtonBackgroundDisabled" Color="Transparent" />
        </Button.Resources>
        <app:CommonImageEx
            x:Name="PersonPicture"
            Width="{x:Bind Width, Mode=OneWay}"
            Height="{x:Bind Height, Mode=OneWay}"
            BorderBrush="{x:Bind BorderBrush, Mode=OneWay}"
            BorderThickness="{x:Bind BorderThickness, Mode=OneWay}"
            CornerRadius="{x:Bind AvatarRadius, Mode=OneWay}"
            DecodePixelWidth="{x:Bind DecodeSize, Mode=OneWay}"
            ImageUrl="{x:Bind Avatar, Mode=OneWay}"
            PlaceholderSource="/Assets/not_login.png"
            ToolTipService.ToolTip="{x:Bind UserName, Mode=OneWay}" />
    </Button>
</UserControl>
