Interface IRotationEffect
Represents the rotation effect.
Namespace: Syncfusion.Presentation
Assembly: Syncfusion.Presentation.Base.dll
Syntax
public interface IRotationEffect : IBehavior
Properties
By
Get the By value of rotation effect
Declaration
float By { get; set; }
Property Value
Type | Description |
---|---|
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.Teeter, 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 IRotationEffect)
{
// Assign the rotation effect values
IRotationEffect rotationEffect = (behavior as IRotationEffect);
rotationEffect.By = 20000;
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.Teeter, 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 Behavior In behaviors
'Check condition for behavior is rotation effect
If (TypeOf behavior Is RotationEffect) Then
'Assign the scale effect values
Dim rotationEffect As RotationEffect = TryCast(behavior,RotationEffect)
rotationEffect.By = 20000
Exit For
End If
Next
'Save the presentation file
ppDoc.Save("Sample.pptx")
'Close the presentation file
ppDoc.Close()
From
Get the from value of rotation effect
Declaration
float From { get; set; }
Property Value
Type | Description |
---|---|
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.Teeter, 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 IRotationEffect)
{
// Assign the rotation effect values
IRotationEffect rotationEffect = (behavior as IRotationEffect);
rotationEffect.From = 10000;
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.Teeter, 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 Behavior In behaviors
'Check condition for behavior is rotation effect
If (TypeOf behavior Is RotationEffect) Then
'Assign the rotation effect values
Dim rotationEffect As RotationEffect = TryCast(behavior,RotationEffect)
rotationEffect.From = 10000
Exit For
End If
Next
'Save the presentation file
ppDoc.Save("Sample.pptx")
'Close the presentation file
ppDoc.Close()
To
Get the To value of rotation effect
Declaration
float To { get; set; }
Property Value
Type | Description |
---|---|
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.Teeter, 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 IRotationEffect)
{
// Assign the rotation effect values
IRotationEffect rotationEffect = (behavior as IRotationEffect);
rotationEffect.To = 15000;
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.Teeter, 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 Behavior In behaviors
'Check condition for behavior is rotation effect
If (TypeOf behavior Is RotationEffect) Then
'Assign the rotation effect values
Dim rotationEffect As RotationEffect = TryCast(behavior,RotationEffect)
rotationEffect.To = 15000
Exit For
End If
Next
'Save the presentation file
ppDoc.Save("Sample.pptx")
'Close the presentation file
ppDoc.Close()