Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0
Description

Excerpt

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

Signature
C#C#
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}
{signature:vb.net
vb.net
}
Public Function LockAspectRatio() As Boolean
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 and Width independently in ExcelWriter, regardless of this value. The aspect ratio is only locked when trying to resize the picture in Excel.

{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}
Example
Code Block
csharpcsharp
titleC#
Code Block
vb.nettitle