Interface IScaleEffect
Represents the scale effect.
Namespace: Syncfusion.Presentation
Assembly: Syncfusion.Presentation.NET.dll
Syntax
public interface IScaleEffect : IBehavior
Properties
By
Get the By value of scale effect
Declaration
PointF By { get; set; }
Property Value
Type |
---|
PointF |
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.GrowShrink, 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 IScaleEffect)
{
// Assign the scale effect values
IScaleEffect scaleEffect = (behavior as IScaleEffect);
PointF point = new PointF();
point.X = 400;
point.Y = 500;
scaleEffect.By = point;
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.GrowShrink, 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 scale effect
If (TypeOf behavior Is ScaleEffect) Then
'Assign the scale effect values
Dim scaleEffect As ScaleEffect = TryCast(behavior, ScaleEffect)
Dim point As New PointF()
point.X = 400
point.Y = 500
scaleEffect.By = point
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 scale effect
Declaration
PointF From { get; set; }
Property Value
Type |
---|
PointF |
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.GrowShrink, 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 IScaleEffect)
{
// Assign the scale effect values
IScaleEffect scaleEffect = (behavior as IScaleEffect);
PointF point = new PointF();
point.X = 400;
point.Y = 500;
scaleEffect.From = point;
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.GrowShrink, 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
If TypeOf behavior Is ScaleEffect Then
'Assign the scale effect values
Dim scaleEffect As ScaleEffect = TryCast(behavior, ScaleEffect)
Dim point As New PointF()
point.X = 400
point.Y = 500
scaleEffect.From = point
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 scale effect
Declaration
PointF To { get; set; }
Property Value
Type |
---|
PointF |
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.GrowShrink, 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 IScaleEffect)
{
// Assign the scale effect values
IScaleEffect scaleEffect = (behavior as IScaleEffect);
PointF point = new PointF();
point.X = 400;
point.Y = 500;
scaleEffect.To = point;
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.GrowShrink, 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 scale effect
If (TypeOf behavior Is ScaleEffect) Then
'Assign the scale effect values
Dim scaleEffect As ScaleEffect = TryCast(behavior, ScaleEffect)
Dim point As New PointF()
point.X = 400
point.Y = 500
scaleEffect.[To] = point
Exit For
End If
Next
'Save the presentation file
ppDoc.Save("Sample.pptx")
'Close the presentation file
ppDoc.Close()
ZoomContent
Get the ZoomContent value of Scale effect
Declaration
Nullable<bool> ZoomContent { get; set; }
Property Value
Type |
---|
System.Nullable<System.Boolean> |
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.GrowShrink, 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 IScaleEffect)
{
// Assign the scale effect values
IScaleEffect scaleEffect = (behavior as IScaleEffect);
scaleEffect.ZoomContent = false;
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.GrowShrink, 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 scale effect
If (TypeOf behavior Is ScaleEffect) Then
'Assign the scale effect values
Dim scaleEffect As ScaleEffect = TryCast(behavior,ScaleEffect)
scaleEffect.ZoomContent = False
Exit For
End If
Next
'Save the presentation file
ppDoc.Save("Sample.pptx")
'Close the presentation file
ppDoc.Close()