<UserControl xmlns="https://github.com/avaloniaui"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:xaml="clr-namespace:PixiEditor.AvaloniaUI.Models.Commands.XAML"
             xmlns:ui="clr-namespace:PixiEditor.Extensions.UI;assembly=PixiEditor.Extensions"
             xmlns:converters="clr-namespace:PixiEditor.AvaloniaUI.Helpers.Converters"
             xmlns:tools="clr-namespace:PixiEditor.AvaloniaUI.ViewModels.Tools"
             xmlns:markupExtensions="clr-namespace:PixiEditor.AvaloniaUI.Helpers.MarkupExtensions"
             mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
             d:DataContext="{tools:ToolViewModel}"
             x:Class="PixiEditor.AvaloniaUI.Views.Main.Tools.ToolPickerButton">
    <Design.DataContext>
        <tools:ToolViewModel />
    </Design.DataContext>
    <Button Command="{xaml:Command PixiEditor.Tools.SelectTool, UseProvided=true}"
            CommandParameter="{Binding}"
            Width="50" Height="40"
            ui:Translator.TooltipKey="{Binding DisplayName}"
            Background="{DynamicResource ThemeBackgroundBrush1}">
        <Button.Template>
            <ControlTemplate>
                <Border Height="40" Width="40" Background="{DynamicResource ThemeBackgroundBrush1}">
                    <ContentPresenter Content="{TemplateBinding Content}"/>
                </Border>
            </ControlTemplate>
        </Button.Template>
        <Button.Content>
            <TextBlock Classes="pixi-icon" FontSize="30" HorizontalAlignment="Center" VerticalAlignment="Center"
                       Text="{Binding Path=IconKey, Converter={converters:KeyToResourceConverter}}"/>
        </Button.Content>
    </Button>
</UserControl>
