Subversion Repositories SoapBoxCore

Rev

Blame | Last modification | View Log | RSS feed

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:SoapBox.Core"
    x:Class="SoapBox.Core.AbstractButtonView">

    <DataTemplate DataType="{x:Type local:AbstractButton}">
        <DataTemplate.Resources>
            <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
        </DataTemplate.Resources>
        <Button ToolTip="{Binding Path=(local:IControl.ToolTip)}"
                Command="{Binding}"
                Visibility="{Binding Path=(local:IControl.Visible), 
                        Converter={StaticResource BooleanToVisibilityConverter}}"
                Padding="{Binding Padding}" Margin="{Binding Margin}"
                IsCancel="{Binding IsCancel}" IsDefault="{Binding IsDefault}">
            <StackPanel Orientation="Horizontal">
                <Image Source="{Binding Path=(local:IButton.Icon)}"/>
                <TextBlock Text="{Binding Path=(local:IButton.Text)}"/>
            </StackPanel>
        </Button>
    </DataTemplate>

</ResourceDictionary>