GoDigram for .NET Framework and .NET Core
Northwoods.Go Namespace / GoObject Class / SetSizeKeepingLocation Method
In This Topic
    SetSizeKeepingLocation Method (GoObject)
    In This Topic
    Sets a new size for this object while maintaining the same location.
    Syntax
    public virtual void SetSizeKeepingLocation( 
       SizeF s
    )

    Parameters

    s
    Remarks
    If the natural location of an object is not the top-left corner, changing the size of an object will also change its location. However, there are times when you wish to change the size without changing the location. This method is more efficient than remembering the Location, setting the Size, and then setting the Location again. By default this assumes the Location is really the TopLeft spot of the object. If you override this method, you should also override the Location property.
    See Also