ComponentFactory.Quicksilver.Layout.GridLayout.DefinitionProxy.UpdateFromMeasure C# (CSharp) Method

UpdateFromMeasure() public method

Update definition sizing after measuring a content of the definition.
public UpdateFromMeasure ( double size ) : void
size double Size of a content within the definintion.
return void
            public void UpdateFromMeasure(double size)
            {
                switch (UserGridUnitType)
                {
                    case GridUnitType.Pixel:
                        // Pixel definitions are fixed, so ignore anything measured inside them
                        break;
                    case GridUnitType.Star:
                        // Track largest measured entry in the star definition
                        DesiredSize = Math.Max(DesiredSize, size);
                        break;
                    case GridUnitType.Auto:
                        // Auto definitions must be as big as the largest entry it contains
                        MinSize = Math.Max(MinSize, size);
                        DesiredSize = MinSize;
                        break;
                }
            }
            #endregion