L
Larry Smith
Hi there,
I need to determine if an arbitrary control appears on a form's design tray
or the actual form itself (or other parent container). Is the following
check reliable or is there an official way (or something cleaner). Thanks.
public static bool IsTrayControl(Control control)
{
return (TypeDescriptor.GetProperties(control)["TrayLocation"] != null);
}
I need to determine if an arbitrary control appears on a form's design tray
or the actual form itself (or other parent container). Is the following
check reliable or is there an official way (or something cleaner). Thanks.
public static bool IsTrayControl(Control control)
{
return (TypeDescriptor.GetProperties(control)["TrayLocation"] != null);
}