private void SetControlProperties(Control control, RenderableField field, Size canvasSize)
        {
            control.Left = WinUtil.GetControlLeft(field, canvasSize.Width);
            control.Top  = WinUtil.GetControlTop(field, canvasSize.Height);

            if (field.ControlHeightPercentage > 0)
            {
                control.Height = WinUtil.GetControlHeight(field, canvasSize.Height);
            }

            if (field.ControlWidthPercentage > 0)
            {
                control.Width = WinUtil.GetControlWidth(field, canvasSize.Width);
            }

            if (field is GUIDField)
            {
                ((GUIDField)field).HasTabStop = false;
            }

            if (field is IInputField && ((IInputField)field).IsReadOnly)
            {
                control.BackColor = Color.WhiteSmoke;
            }
            else if (control is DragableLabel == false)
            {
                control.BackColor = SystemColors.Window;
            }

            control.TabStop  = field.HasTabStop;
            control.TabIndex = (int)field.TabIndex;

            if ((field is OptionField || field is GridField) == false)
            {
                control.Font = field.ControlFont;
            }

            control.ContextMenu = new ContextMenu();

            if (field.ControlHeightPercentage == 0 || field.ControlWidthPercentage == 0)
            {
                field.ControlHeightPercentage = 1.0 * ((Control)control).Height / canvasSize.Height;
                field.ControlWidthPercentage  = 1.0 * ((Control)control).Width / canvasSize.Width;
                field.SaveToDb();
            }

            if (control is IFieldControl)
            {
                ((IFieldControl)control).Field = field;
            }
        }