/// <summary> /// return isMultiLine of the control, if it is child of MgRadioPanel then take the isMultiLine from the parent /// </summary> /// <param name="control"></param> /// <returns></returns> public static bool GetIsMultiLine(Control control) { bool isMultiLine = false; // MgRadioButton is on MgRadioPanel and multiline info is saved on MgRadioPanel. if (control is MgRadioButton) { control = control.Parent; } IMultilineProperty multiLineRenderer = control as IMultilineProperty; if (multiLineRenderer != null) { isMultiLine = multiLineRenderer.Multiline; } return(isMultiLine); }