[]
public class XLPictureShape : XLShape, ICloneable
<p>
<b>XLPictureShape</b> derives from the generic <xref href="C1.Excel.XLShape" data-throw-if-not-resolved="false"></xref> class
to expose properties of images embedded in sheets. These properties include the actual Image as well as information on how it should be displayed, including Brightness, Contrast, and clipping information.
You can add images to cells simply by assigning Image objects directly to the Value property of XLCell objects. In this case, C1XLBook will create and initialize an XLPictureShape automatically. However, this method does not provide a lot of flexibility in terms of aligning, scaling, and clipping the image.
A more flexible option is to create an XLPictureShape object in code, using the constructor that takes alignment and scaling parameters, and then assign this XLPictureShape object to a cell's Value property.
Name | Description |
---|---|
BottomClip | Gets or sets the bottom clipping area of this XLPictureShape, in twips. |
Brightness | Gets or sets the brightness of this XLPictureShape (between 0 and 1). |
BrightnessInPercents | Gets or sets the brightness in percents of this XLPictureShape (between -100 and 100). |
Contrast | Gets or sets the contrast of this XLPictureShape (between 0 and 1). |
ContrastInPercents | Gets or sets the contrast in percents of this XLPictureShape (between -100 and 100). |
FileName | Gets or sets the file name of this XLPictureShape. |
Image | Gets a reference to the image/bitmap contained in this XLPictureShape. |
ImageSize | Gets image size in twips. |
IsEmpty | Determines whether the shape is empty. |
LeftClip | Gets or sets the left clipping area of this XLPictureShape, in twips. |
Macro | Gets or sets the command of call macro of this XLPictureShape. |
RightClip | Gets or sets the right clipping area of this XLPictureShape, in twips. |
TopClip | Gets or sets the top clipping area of this XLPictureShape, in twips. |
Transparent | Gets or sets the transparent color of this XLPictureShape. |
ViewType | Gets or sets whether this XLPictureShape should be displayed in color, grayscale, or black and white. |
Name | Description |
---|---|
CreateProperties(IDictionary) | Populates an IDictionary with the shape properties. |
ParseProperties(IDictionary) | Parse shape properties. |