ComponentFactory.Krypton.Ribbon.ViewDrawRibbonGroupDomainUpDown.UpdateParent(System.Windows.Forms.Control)

Here are the examples of the csharp api class ComponentFactory.Krypton.Ribbon.ViewDrawRibbonGroupDomainUpDown.UpdateParent(System.Windows.Forms.Control) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Example 7

1. Example

Project: Krypton
Source File: ViewDrawRibbonGroupDomainUpDown.cs
public override Size GetPreferredSize(ViewLayoutContext context)
        {
            Size preferredSize = Size.Empty;

            // Ensure the control has the correct parent
            UpdateParent(context.Control);

            // If there is a domain up-down associated then ask for its requested size
            if (LastDomainUpDown != null)
            {
                if (ActualVisible(LastDomainUpDown))
                {
                    preferredSize = LastDomainUpDown.GetPreferredSize(context.DisplayRectangle.Size);

                    // Add two pixels, one for the left and right edges that will be padded
                    preferredSize.Width += 2;
                }
            }
            else
                preferredSize.Width = NULL_CONTROL_WIDTH;

            if (_currentSize == GroupItemSize.Large)
                preferredSize.Height = _ribbon.CalculatedValues.GroupTripleHeight;
            else
                preferredSize.Height = _ribbon.CalculatedValues.GroupLineHeight;

            return preferredSize;
        }