[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IGraphic.LockAspectRatio

LockAspectRatio Property

LockAspectRatio

Gets or sets whether the picture field retains its original proportions when you resize it.

Declaration
bool LockAspectRatio { get; set; }
Property LockAspectRatio As Boolean
Examples
IGraphic graphic = worksheet.PageSetup.CenterHeaderPicture;
using (MemoryStream stream = CreateSampleImageStream())
{
    graphic.SetGraphicStream(stream, ImageType.PNG);
}
graphic.LockAspectRatio = true;
bool lockAspectRatio = graphic.LockAspectRatio;