AudioFrame
Contents
[
Hide
]AudioFrame class
Represents an audio clip on a slide.
public class AudioFrame : PictureFrame, IAudioFrame
Properties
Name | Description |
---|---|
Adjustments { get; } | Returns a collection of shape’s adjustment values. Read-only IAdjustValueCollection . |
AlternativeText { get; set; } | Returns or sets the alternative text associated with a shape. Read/write String. |
AlternativeTextTitle { get; set; } | Returns or sets the title of alternative text associated with a shape. Read/write String. |
AudioCdEndTrack { get; set; } | Returns or sets a last track index Read/write Int32. |
AudioCdEndTrackTime { get; set; } | Returns or sets a last track time. Read/write Int32. |
AudioCdStartTrack { get; set; } | Returns or sets a start track index. Read/write Int32. |
AudioCdStartTrackTime { get; set; } | Returns or sets a start track time. Read/write Int32. |
BlackWhiteMode { get; set; } | Property specifies how a shape will render in black-and-white display mode.. Read/write BlackWhiteMode . |
ConnectionSiteCount { get; } | Returns the number of connection sites on the shape. Read-only Int32. |
CustomData { get; } | Returns the shape’s custom data. Read-only ICustomData . |
virtual EffectFormat { get; } | Returns the EffectFormat object which contains pixel effects applied to a shape. Note: can return null for certain types of shapes which don’t have effect properties. Read-only IEffectFormat . |
Embedded { get; } | Determines whether a sound is embedded to a presentation. Read-only Boolean. |
EmbeddedAudio { get; set; } | Returns or sets embedded audio object. Read/write IAudio . |
virtual FillFormat { get; } | Returns the FillFormat object that contains fill formatting properties for a shape. Note: can return null for certain types of shapes which don’t have fill properties. Read-only IFillFormat . |
Frame { get; set; } | Returns or sets the shape frame’s properties. Read/write IShapeFrame . |
Height { get; set; } | Returns or sets the height of the shape. Read/write Single. |
Hidden { get; set; } | Determines whether the shape is hidden. Read/write Boolean. |
HideAtShowing { get; set; } | Determines whether an AudioFrame is hidden. Read/write Boolean. |
HyperlinkClick { get; set; } | Returns or sets the hyperlink defined for mouse click. Read/write IHyperlink . |
HyperlinkManager { get; } | Returns the hyperlink manager. Read-only IHyperlinkManager . |
HyperlinkMouseOver { get; set; } | Returns or sets the hyperlink defined for mouse over. Read/write IHyperlink . |
IsGrouped { get; } | Determines whether the shape is grouped. Read-only Boolean. |
IsTextHolder { get; } | Determines whether the shape is TextHolder_PPT. Read-only Boolean. |
virtual LineFormat { get; } | Returns the LineFormat object that contains line formatting properties for a shape. Note: can return null for certain types of shapes which don’t have line properties. Read-only ILineFormat . |
LinkPathLong { get; set; } | Returns or sets the name of an audio file which is linked to an AudioFrame. Read/write String. |
Name { get; set; } | Returns or sets the name of a shape. Must be not null. Use empty string value if needed. Read/write String. |
OfficeInteropShapeId { get; } | Gets unique shape identifier in slide scope. Read-only UInt32. See also UniqueId for getting unique shape identifier in presentation scope. |
ParentGroup { get; } | Returns parent GroupShape object if shape is grouped. Otherwise returns null. Read-only IGroupShape . |
PictureFormat { get; } | Returns the PictureFillFormat object for a picture frame. Read-only IPictureFillFormat . |
PictureFrameLock { get; } | Returns shape’s locks. Read-only IPictureFrameLock . |
Placeholder { get; } | Returns the placeholder for a shape. Returns null if the shape has no placeholder. Read-only IPlaceholder . |
PlayAcrossSlides { get; set; } | Determines whether audio is playing across the slides. Read/write Boolean. |
PlayLoopMode { get; set; } | Determines whether an audio is looped. Read/write Boolean. |
PlayMode { get; set; } | Returns or sets the audio play mode. Read/write AudioPlayModePreset . |
Presentation { get; } | Returns the parent presentation of a slide. Read-only IPresentation . |
RawFrame { get; set; } | Returns or sets the raw shape frame’s properties. Read/write IShapeFrame . |
RelativeScaleHeight { get; set; } | Returns or sets the scale of height(relative to original picture size) of the picture frame. Value 1.0 corresponds to 100%. Read/write Single. |
RelativeScaleWidth { get; set; } | Returns or sets the scale of width (relative to original picture size) of the picture frame. Value 1.0 corresponds to 100%. Read/write Single. |
RewindAudio { get; set; } | Determines whether audio is automatically rewinded to start after playing. Read/write Boolean. |
Rotation { get; set; } | Returns or sets the number of degrees the specified shape is rotated around the z-axis. A positive value indicates clockwise rotation; a negative value indicates counterclockwise rotation. Read/write Single. |
ShapeLock { get; } | Returns shape’s locks. Read-only IPictureFrameLock . (2 properties) |
ShapeStyle { get; } | Returns shape’s style object. Read-only IShapeStyle . |
override ShapeType { get; set; } | Returns or sets the AutoShape type for a PictureFrame. There are allowable all items of the set ShapeType , except all sorts of lines: |
Slide { get; } | Returns the parent slide of a shape. Read-only IBaseSlide . |
virtual ThreeDFormat { get; } | Returns the ThreeDFormat object that 3d effect properties for a shape. Note: can return null for certain types of shapes which don’t have 3d properties. Read-only IThreeDFormat . |
UniqueId { get; } | Gets unique shape identifier in presentation scope. Read-only UInt32. See also OfficeInteropShapeId for getting unique shape identifier in slide scope. |
Volume { get; set; } | Returns or sets the audio volume. Read/write AudioVolumeMode . |
Width { get; set; } | Returns or sets the width of the shape. Read/write Single. |
X { get; set; } | Returns or sets the x-coordinate of the upper-left corner of the shape. Read/write Single. |
Y { get; set; } | Returns or sets the y-coordinate of the upper-left corner of the shape. Read/write Single. |
virtual ZOrderPosition { get; } | Returns the position of a shape in the z-order. Shapes[0] returns the shape at the back of the z-order, and Shapes[Shapes.Count - 1] returns the shape at the front of the z-order. Read-only Int32. |
Methods
Name | Description |
---|---|
AddPlaceholder(IPlaceholder) | Adds a new placeholder if there is no and sets placeholder properties to a specified one. |
CreateShapeElements() | Creates and returns array of shape’s elements. |
GetBasePlaceholder() | Returns a basic placeholder shape (shape from the layout and/or master slide that the current shape is inherited from). A null is returned if the current shape is not inherited. |
GetGeometryPaths() | Returns the copy of path of the geometry shape. Coordinates are relative to the left top corner of the shape. |
GetThumbnail() | Returns shape thumbnail. ShapeThumbnailBounds.Shape shape thumbnail bounds type is used by default. |
GetThumbnail(ShapeThumbnailBounds, float, float) | Returns shape thumbnail. |
RemovePlaceholder() | Defines that this shape isn’t a placeholder. |
SetGeometryPath(IGeometryPath) | Updates shape geometry from IGeometryPath object. Coordinates must be relative to the left top corner of the shape. Changes the type of the shape (ShapeType ) to Custom. |
SetGeometryPaths(IGeometryPath[]) | Updates shape geometry from array of IGeometryPath . Coordinates must be relative to the left top corner of the shape. Changes the type of the shape (ShapeType ) to Custom. |
WriteAsSvg(Stream) | Saves content of Shape as SVG file. |
WriteAsSvg(Stream, ISVGOptions) | Saves content of Shape as SVG file. |
Examples
The following examples shows how to change Audio Play Options.
[C#]
using (Presentation pres = new Presentation("AudioFrameEmbed_out.pptx"))
{
// Gets the AudioFrame shape
AudioFrame audioFrame = (AudioFrame)pres.Slides[0].Shapes[0];
// Sets the Play mode to play on click
audioFrame.PlayMode = AudioPlayModePreset.OnClick;
// Sets the volume to Low
audioFrame.Volume = AudioVolumeMode.Low;
// Sets the audio to play across slides
audioFrame.PlayAcrossSlides = true;
// Disables loop for the audio
audioFrame.PlayLoopMode = false;
// Hides the AudioFrame during the slide show
audioFrame.HideAtShowing = true;
// Rewinds the audio to start after playing
audioFrame.RewindAudio = true;
// Saves the PowerPoint file to disk
pres.Save("AudioFrameEmbed_changed.pptx", SaveFormat.Pptx);
}
See Also
- class PictureFrame
- interface IAudioFrame
- namespace Aspose.Slides
- assembly Aspose.Slides