private void ApplyPadDefaultLocation(AbstractPad ci) { object[] attrs = ci.GetType().GetCustomAttributes(typeof(PadDefaultLocationAttribute), false); if (attrs.Length > 0) { PadDefaultLocationAttribute attr = attrs[0] as PadDefaultLocationAttribute; ApplyDockContentLocation(ci, attr.DockState); } }