Skip to main content
A newer version of this page is available. .

XlAnchorPoint Struct

Represents an anchor point used to position a picture in a worksheet.

Namespace: DevExpress.Export.Xl

Assembly: DevExpress.Printing.v20.2.Core.dll

NuGet Packages: DevExpress.Printing.Core, DevExpress.WindowsDesktop.Printing.Core

Declaration

public struct XlAnchorPoint :
    IEquatable<XlAnchorPoint>

The following members return XlAnchorPoint objects:

Remarks

An XlAnchorPoint object can be used to anchor an IXlPicture object to specific cells in a worksheet. To specify the starting position of a picture, create an instance of the XlAnchorPoint class and assign it to the IXlPicture.TopLeft property. By default, the top-left corner of the picture will be anchored to the top-left corner of the cell located at the intersection of the specified row (XlAnchorPoint.Row) and column (XlAnchorPoint.Column). However, you can specify row and column offsets (XlAnchorPoint.RowOffsetInPixels and XlAnchorPoint.ColumnOffsetInPixels) within the anchor cell to prevent the picture from being precisely on top of the anchor cell. To specify the picture’s extent in the worksheet, define the ending anchor for the bottom-right corner of the picture using the IXlPicture.BottomRight property.

Note that you can also use the IXlPicture.SetOneCellAnchor and IXlPicture.SetTwoCellAnchor methods that accept the XlAnchorPoint objects as parameters to anchor a picture to worksheet cells. For an example, refer to the How to: Insert and Position a Picture in a Worksheet article.

See Also