<UserControl
    x:Class="BPASmartClient.CustomResource.UserControls.IcoButton"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:local="clr-namespace:BPASmartClient.CustomResource.UserControls"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    d:DesignHeight="30"
    d:DesignWidth="130"
    mc:Ignorable="d">

    <!--<UserControl.Resources>
        <Style x:Key="IcoButtonStyle" TargetType="Button">
            <Setter Property="FontFamily" Value="../Fonts/#iconfont" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Border
                            x:Name="br"
                            Background="Transparent"
                            BorderBrush="#FF19B7EC"
                            BorderThickness="2">
                            <StackPanel
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Orientation="Horizontal">
                                <TextBlock
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    FontFamily="{Binding}"
                                    Text="{Binding ElementName=br}" />
                                <ContentControl
                                    Margin="10,0,5,0"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    Content="{TemplateBinding Content}"
                                    Foreground="{TemplateBinding Foreground}" />
                            </StackPanel>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter TargetName="br" Property="Background" Value="#2219B7EC" />
                            </Trigger>

                            <Trigger Property="IsPressed" Value="true">
                                <Setter TargetName="br" Property="Background" Value="#2219B7EC" />
                            </Trigger>

                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </UserControl.Resources>-->


    <Grid>
        <Button Name="a">
            <Button.Style>
                <Style TargetType="Button">
                    <Setter Property="FontFamily" Value="../Fonts/#iconfont" />
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="Button">
                                <Border
                                    x:Name="br"
                                    Background="Transparent"
                                    BorderBrush="#FF19B7EC"
                                    BorderThickness="2">
                                    <StackPanel
                                        HorizontalAlignment="Center"
                                        VerticalAlignment="Center"
                                        Orientation="Horizontal">
                                        <TextBlock
                                            FontFamily="../Fonts/#iconfont"
                                            Text="{Binding IcoText}" />
                                        <ContentControl
                                            Margin="10,0,5,0"
                                            Content="{TemplateBinding Content}"
                                            Foreground="{TemplateBinding Foreground}" />
                                    </StackPanel>
                                </Border>
                                <ControlTemplate.Triggers>
                                    <Trigger Property="IsMouseOver" Value="True">
                                        <Setter TargetName="br" Property="Background" Value="#2219B7EC" />
                                    </Trigger>

                                    <Trigger Property="IsPressed" Value="true">
                                        <Setter TargetName="br" Property="Background" Value="#2219B7EC" />
                                    </Trigger>

                                </ControlTemplate.Triggers>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Button.Style>
        </Button>
    </Grid>
</UserControl>
