<Window x:Class="ButtonCustomDepProp_ChangeNot.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:l="clr-namespace:ButtonCustomDepProp_ChangeNot"
        Title="MainWindow" Height="101" Width="386">
	<Canvas>
        <l:MyButton x:Name="myButton" Height="61" Width="74" Click="MyButton_Click">
            <l:MyButton.Style>
                <Style TargetType="{x:Type l:MyButton}">
                    <Style.Triggers>
                        <Trigger Property="Count" Value="2">
                            <Setter Property="Background" Value="Blue"/>
                        </Trigger>
                    </Style.Triggers>
                </Style>
            </l:MyButton.Style>
            MyButton
        </l:MyButton>
        <Label Canvas.Left="80" Canvas.Top="18" Content="MyButton.Count:" Height="28" Name="label1" Width="98" />
		<TextBox Canvas.Left="184" Canvas.Top="23" Height="23" Name="textBox1" Width="155" Text="{Binding ElementName=myButton, Path=Count}" />
	</Canvas>
</Window>
