public class MyControl : Control
{
...
protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
{
base.OnRenderSizeChanged(sizeInfo);
if (DesignerProperties.GetIsInDesignMode(this))
{
AdornerLayer adornerLayer = AdornerLayer.GetAdornerLayer(this);//Not referenced to an instance(Occurs when a drag operation enters the design panel).
if (adornerLayer != null)
{
//TODO:...
}
}
}
...
}