/// <summary> /// ContentProperty property changed handler. /// </summary> /// <param name="d">ContentControl that changed its Content.</param> /// <param name="e">DependencyPropertyChangedEventArgs.</param> private static void OnLeftPropertyChanged(IDependencyObject d, DependencyPropertyChangedEventArgs e) { Canvas source = d as Canvas; Debug.Assert(source != null, "The source is not an instance of ContentControl!"); // Notify derived classes of the change source.OnLeftChanged(e.OldValue, e.NewValue); }