Wiki Markup |
---|
{description} {excerpt} Gets or sets whether the aspect ratio of the picture should be locked. {excerpt} {signature:C#} public bool LockAspectRatio { get; set; } {signature} {signature:vb.net} Public Function LockAspectRatio() As Boolean {signature} {remarks} 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|HeaderFooterPicture.Height] and [Width|HeaderFooterPicture.Width] independently in ExcelWriter, regardless of this value. The aspect ratio is only locked when trying to resize the picture in Excel. {remarks} {example} {code:csharp|title=C#} 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; {code} {code:vb.net|title=vb.net} 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 {code} {example} |
Page History
Overview
Content Tools