using System.Windows; using System.Windows.Controls; namespace Plane.Windows.Controls { public class ProgressButton : Button { // Using a DependencyProperty as the backing store for IsProcessing. This enables animation, styling, binding, etc... public static readonly DependencyProperty IsProcessingProperty = DependencyProperty.Register( "IsProcessing", typeof(bool), typeof(ProgressButton), new PropertyMetadata(defaultValue: false) ); public bool IsProcessing { get { return (bool)GetValue(IsProcessingProperty); } set { SetValue(IsProcessingProperty, value); } } } }