Interface IAnimationPoint
Represents the animation point.
Namespace: Syncfusion.Presentation
Assembly: Syncfusion.Presentation.Base.dll
Syntax
public interface IAnimationPoint
Properties
Formula
Get the formula of point
Declaration
string Formula { get; set; }
Property Value
Type |
---|
System.String |
Examples
// Create a new presentation.
IPresentation ppDoc = Presentation.Create();
// Add a slide to the presentation.
ISlide slide = ppDoc.Slides.Add(SlideLayoutType.Blank);
// Add shape on the slide
IShape shape = slide.Shapes.AddShape(AutoShapeType.Diamond, 150, 150, 250, 150);
// Add animation effect on the slide with shape
IEffect effect = ppDoc.Slides[0].Timeline.MainSequence.AddEffect(shape, EffectType.Fly, EffectSubtype.None, EffectTriggerType.OnClick);
// Get the behaviors list from the effect
IBehaviors behaviors = effect.Behaviors;
// Get behavior using foreach loop
foreach (IBehavior behavior in behaviors)
{
if (behavior is IPropertyEffect)
{
// Assign the property effect values
IPropertyEffect propertyEffect = (behavior as IPropertyEffect);
IAnimationPoints points = propertyEffect.Points;
points[0].Formula = "0.5";
break;
}
}
// Save the presentation file
ppDoc.Save("Sample.pptx");
// Close the presentation file
ppDoc.Close();
'Create a new presentation
Dim ppDoc As IPresentation = Presentation.Create()
'Add a slide to the presentation.
Dim slide As ISlide = ppDoc.Slides.Add(SlideLayoutType.Blank)
'Add shape on the slide
Dim shape As IShape = slide.Shapes.AddShape(AutoShapeType.Diamond, 150, 150, 250, 150)
'Add animation effect on the slide with shape
Dim effect As IEffect = ppDoc.Slides(0).TimeLine.MainSequence.AddEffect(shape, EffectType.Fly, EffectSubtype.None, EffectTriggerType.OnClick)
'Get the behaviors list from the effect
Dim behaviors As IBehaviors = effect.Behaviors
'Get behavior using foreach loop
For Each behavior As IBehavior In behaviors
'Check condition for behavior is property effect
If (TypeOf behavior Is IPropertyEffect) Then
'Assign the property effect values
Dim propertyEffect As IPropertyEffect = TryCast(behavior,IPropertyEffect)
Dim points As IAnimationPoints = propertyEffect.Points
points(0).Formula = "0.5"
Exit For
End If
Next
'Save the presentation file
ppDoc.Save("Sample.pptx")
'Close the presentation file
ppDoc.Close()
Time
Get the time value of point
Declaration
float Time { get; set; }
Property Value
Type |
---|
System.Single |
Examples
// Create a new presentation.
IPresentation ppDoc = Presentation.Create();
// Add a slide to the presentation.
ISlide slide = ppDoc.Slides.Add(SlideLayoutType.Blank);
// Add shape on the slide
IShape shape = slide.Shapes.AddShape(AutoShapeType.Diamond, 150, 150, 250, 150);
// Add animation effect on the slide with shape
IEffect effect = ppDoc.Slides[0].Timeline.MainSequence.AddEffect(shape, EffectType.Fly, EffectSubtype.None, EffectTriggerType.OnClick);
// Get the behaviors list from the effect
IBehaviors behaviors = effect.Behaviors;
// Get behavior using foreach loop
foreach (IBehavior behavior in behaviors)
{
if (behavior is IPropertyEffect)
{
// Assign the property effect values
IPropertyEffect propertyEffect = (behavior as IPropertyEffect);
IAnimationPoints points = propertyEffect.Points;
points[1].Time = 90;
break;
}
}
// Save the presentation file
ppDoc.Save("Sample.pptx");
// Close the presentation file
ppDoc.Close();
'Create a new presentation
Dim ppDoc As IPresentation = Presentation.Create()
'Add a slide to the presentation.
Dim slide As ISlide = ppDoc.Slides.Add(SlideLayoutType.Blank)
'Add shape on the slide
Dim shape As IShape = slide.Shapes.AddShape(AutoShapeType.Diamond, 150, 150, 250, 150)
'Add animation effect on the slide with shape
Dim effect As IEffect = ppDoc.Slides(0).TimeLine.MainSequence.AddEffect(shape, EffectType.Fly, EffectSubtype.None, EffectTriggerType.OnClick)
'Get the behaviors list from the effect
Dim behaviors As IBehaviors = effect.Behaviors
'Get behavior using foreach loop
For Each behavior As IBehavior In behaviors
'Check condition for behavior is property effect
If (TypeOf behavior Is IPropertyEffect) Then
'Assign the property effect values
Dim propertyEffect As IPropertyEffect = TryCast(behavior,IPropertyEffect)
Dim points As IAnimationPoints = propertyEffect.Points
points(1).Time = 90
Exit For
End If
Next
'Save the presentation file
ppDoc.Save("Sample.pptx")
'Close the presentation file
ppDoc.Close()
Value
Get the value of point
Declaration
object Value { get; set; }
Property Value
Type |
---|
System.Object |
Examples
// Create a new presentation.
IPresentation ppDoc = Presentation.Create();
// Add a slide to the presentation.
ISlide slide = ppDoc.Slides.Add(SlideLayoutType.Blank);
// Add shape on the slide
IShape shape = slide.Shapes.AddShape(AutoShapeType.Diamond, 150, 150, 250, 150);
// Add animation effect on the slide with shape
IEffect effect = ppDoc.Slides[0].Timeline.MainSequence.AddEffect(shape, EffectType.Fly, EffectSubtype.None, EffectTriggerType.OnClick);
// Get the behaviors list from the effect
IBehaviors behaviors = effect.Behaviors;
// Get behavior using foreach loop
foreach (IBehavior behavior in behaviors)
{
if (behavior is IPropertyEffect)
{
// Assign the property effect values
IPropertyEffect propertyEffect = (behavior as IPropertyEffect);
IAnimationPoints points = propertyEffect.Points;
points[0].Value = "#ppt_x";
break;
}
}
// Save the presentation file
ppDoc.Save("Sample.pptx");
// Close the presentation file
ppDoc.Close();
'Create a new presentation
Dim ppDoc As IPresentation = Presentation.Create()
'Add a slide to the presentation.
Dim slide As ISlide = ppDoc.Slides.Add(SlideLayoutType.Blank)
'Add shape on the slide
Dim shape As IShape = slide.Shapes.AddShape(AutoShapeType.Diamond, 150, 150, 250, 150)
'Add animation effect on the slide with shape
Dim effect As IEffect = ppDoc.Slides(0).TimeLine.MainSequence.AddEffect(shape, EffectType.Fly, EffectSubtype.None, EffectTriggerType.OnClick)
'Get the behaviors list from the effect
Dim behaviors As IBehaviors = effect.Behaviors
'Get behavior using foreach loop
For Each behavior As IBehavior In behaviors
'Check condition for behavior is property effect
If (TypeOf behavior Is IPropertyEffect) Then
'Assign the property effect values
Dim propertyEffect As IPropertyEffect = TryCast(behavior,IPropertyEffect)
Dim points As IAnimationPoints = propertyEffect.Points
points(0).Value = "#ppt_x"
Exit For
End If
Next
'Save the presentation file
ppDoc.Save("Sample.pptx")
'Close the presentation file
ppDoc.Close()