Gets or sets whether the aspect ratio of the picture should be locked.

public bool LockAspectRatio { get; set; }
Public Function LockAspectRatio() As Boolean

Use this property to maintain or break the same aspect ratio for a picture in a header or footer while resizing. The default value is true.

You will still be able to manipulate the Height and Width independently in ExcelWriter, regardless of this value. The aspect ratio is only locked when trying to resize the picture in Excel.

HeaderFooterPicture hfp = header.GetPicture();

//--- Lock the aspect ratio of the picture so that it is not
//--- stretched as it is resized
hfp.LockAspectRatio = true;
hfp.Height = 20;
hfp.Width = 30;
Dim hfp As HeaderFooterPicture = header.GetPicture()

'--- Lock the aspect ratio of the picture so that it is not
'--- stretched as it is resized
hfp.LockAspectRatio = True
hfp.Height = 20
hfp.Width = 30