Q: User control and event for Padding changed Im working on gauge control.
I need to redraw everything inside when Size or Padding property is changed.
This is how I deal with Size property changes:
public RoundGauge()
{
    this.SizeChanged += delegate 
    { 
        ReDrawEverything(); 
    };
    InitializeComponent();
}

But there is no PaddingChanged event. What can I do with this?

A: There is no indeed no "PaddingChanged" event but you could use a DependencyPropertyDescriptor to subscribe to changes to a dependency property:
public partial class RoundGauge : UserControl
{
    public RoundGauge()
    {
        InitializeComponent();

        DependencyPropertyDescriptor dpd = DependencyPropertyDescriptor.FromProperty(PaddingProperty, typeof(UserControl));
        if (dpd != null)
            dpd.AddValueChanged(this, OnPaddingChanged);
    }

    private void OnPaddingChanged(object sender, EventArgs e)
    {
        MessageBox.Show("Padding changed!");
    }
}

Please refer to the following blog post for more information.
Handling changes to dependency properties in the view: https://blog.magnusmontin.net/2014/03/31/handling-changes-to-dependency-properties/

A: You can override OnPropertyChanged event:
public partial class RoundGauge : Control
{
    public RoundGauge()
    { 
    } 

    protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)
    {
        if (e.Property == PaddingProperty)
        {
            Thickness oldPadding = (Thickness)e.OldValue;
            Thickness newPadding = (Thickness)e.NewValue;
            // ...
        }
    }
}

