Interface IFilterEffect
Represents the filter effect.
Namespace: Syncfusion.Presentation
Assembly: Syncfusion.Presentation.NET.dll
Syntax
public interface IFilterEffect : IBehavior
Properties
Reveal
Get the filter effect reveal type
Declaration
FilterEffectRevealType Reveal { get; set; }
Property Value
Type |
---|
FilterEffectRevealType |
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 IFilterEffect)
{
// Assign the filter effect values
IFilterEffect filterEffect = (behavior as IFilterEffect);
filterEffect.Reveal = FilterEffectRevealType.In;
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 filter effect
If (TypeOf behavior Is FilterEffect) Then
'Assign the filter effect values
Dim filterEffect As FilterEffect = TryCast(behavior,FilterEffect)
filterEffect.Reveal = FilterEffectRevealType.[In]
Exit For
End If
Next
'Save the presentation file
ppDoc.Save("Sample.pptx")
'Close the presentation file
ppDoc.Close()
Subtype
Get the subtype of filter effect
Declaration
SubtypeFilterEffect Subtype { get; set; }
Property Value
Type |
---|
SubtypeFilterEffect |
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 IFilterEffect)
{
// Assign the filter effect values
IFilterEffect filterEffect = (behavior as IFilterEffect);
filterEffect.Subtype = SubtypeFilterEffect.None;
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 filter effect
If (TypeOf behavior Is FilterEffect) Then
'Assign the filter effect values
Dim filterEffect As FilterEffect = TryCast(behavior,FilterEffect)
filterEffect.Subtype = SubtypeFilterEffect.None
Exit For
End If
Next
'Save the presentation file
ppDoc.Save("Sample.pptx")
'Close the presentation file
ppDoc.Close()
Type
Get the type of filter effect
Declaration
FilterEffectType Type { get; set; }
Property Value
Type |
---|
FilterEffectType |
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 IFilterEffect)
{
// Assign the filter effect values
IFilterEffect filterEffect = (behavior as IFilterEffect);
filterEffect.Type = FilterEffectType.Dissolve;
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 filter effect
If (TypeOf behavior Is FilterEffect) Then
'Assign the filter effect values
Dim filterEffect As FilterEffect = TryCast(behavior,FilterEffect)
filterEffect.Type = FilterEffectType.Dissolve
Exit For
End If
Next
'Save the presentation file
ppDoc.Save("Sample.pptx")
'Close the presentation file
ppDoc.Close()