using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls;
using System.Windows;

namespace ButtonCustomDependencyProperty
{
    class MyButton:Button
    {
        public static DependencyProperty CountProperty = DependencyProperty.Register(
"Count", typeof(int), typeof(MyButton), new FrameworkPropertyMetadata(0));

        public int Count
        {
            get { return (int)GetValue(MyButton.CountProperty); }
            set { SetValue(MyButton.CountProperty, value); }
        }

    }
}
