WordPictureControl
OfficeIMO.Word
Represents a picture content control within a paragraph.
Inheritance
- WordElement
- WordPictureControl
Usage
Explore 6 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 6
- Method WordDocument.GetPictureControlByAlias
- Method WordDocument.GetPictureControlByTag
- Property WordDocument.PictureControls
- Method WordParagraph.AddPictureControl
- Property WordParagraph.PictureControl
- Property WordSection.PictureControls
Methods
public WordContentControlPictureValue? ExtractValue() #Extracts the current picture content-control image as a form-map value.
Returns
WordContentControlPictureValue?public void SetImage(string filePath, OfficeLength? width = null, OfficeLength? height = null) #Replaces the picture content-control image with the image at the supplied path.
Parameters
- filePath string
- Image file path.
- width OfficeIMO.OfficeLength? = null
- Optional physical width of the image.
- height OfficeIMO.OfficeLength? = null
- Optional physical height of the image.
public void SetImage(Stream imageStream, string fileName, OfficeLength? width = null, OfficeLength? height = null) #Replaces the picture content-control image with image data from a stream.
Parameters
- imageStream System.IO.Stream
- Image stream.
- fileName string
- File name used to infer image type.
- width OfficeIMO.OfficeLength? = null
- Optional physical width of the image.
- height OfficeIMO.OfficeLength? = null
- Optional physical height of the image.
Inherited Methods
Properties
public string? Text { get; } #Gets the native content text using the same projection as a generic structured document tag; null means no ordinary text run.
public string? Alias { get; } #Gets the alias associated with this picture control.
public string? Tag { get; set; } #Gets or sets the tag value for this picture control.
public WordImage? Image { get; } #Gets the image currently contained by the picture content control.