IXlPicture.AnchorType Property
Gets or sets the anchoring type used to position a picture within a worksheet.
Namespace: DevExpress.Export.Xl
Assembly: DevExpress.Printing.v24.2.Core.dll
Declaration
Property Value
Type | Description |
---|---|
XlAnchorType | One of the XlAnchorType enumeration values. |
Available values:
Name | Description |
---|---|
TwoCell | Two Cell Anchoring. The picture moves and/or resizes with the underlying cells as specified by the IXlPicture.AnchorBehavior property. |
OneCell | One Cell Anchoring. The picture moves with the anchor cell, but its size remains the same. |
Absolute | Absolute Anchoring. The picture does not move or resize with the underlying cells. |
Remarks
Use the AnchorType property to define the placement of a picture within a worksheet. The table below lists the available anchoring types.
Anchoring Type | XlAnchorType Value | Description | How to Set |
---|---|---|---|
Absolute Anchoring | Positions a picture within a worksheet based on absolute coordinates that represent offsets from the left and top sides of the worksheet. The picture does not move or resize with the underlying cells. | Use the IXlPicture.SetAbsoluteAnchor method to specify the absolute position of a picture within a worksheet and set the picture’s width and height. | |
One Cell Anchoring | Anchors the top-left corner of a picture to a cell in a worksheet. The picture moves with the anchor cell, but its size remains the same. | Use the IXlPicture.SetOneCellAnchor method to specify the start position for a picture and set the picture’s width and height. | |
Two Cell Anchoring | Anchors a picture to two cells in a worksheet. The first cell defines the position of the top-left corner of the picture, while the second one specifies where picture’s bottom-right corner is located. The picture’s positioning and resizing behavior depends upon the value of the IXlPicture.AnchorBehavior property. | Use the IXlPicture.SetTwoCellAnchor method to specify the start and end positions for a picture and define its anchoring behavior. |