menu

Xamarin.Android

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Interface IBehavior - Xamarin.Android API Reference | Syncfusion

    Show / Hide Table of Contents

    Interface IBehavior

    Represents the behavior.

    Namespace: Syncfusion.Presentation
    Assembly: Syncfusion.Presentation.Portable.dll
    Syntax
    public interface IBehavior

    Properties

    Accumulate

    Get the behavior Accumulate value

    Declaration
    Nullable<bool> Accumulate { 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.ChangeFillColor, 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 ISetEffect)
    {
    // Assign the set effect values
    ISetEffect setEffect = (behavior as ISetEffect);
    setEffect.Accumulate = null;
    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.ChangeFillColor, 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 set effect
    If (TypeOf behavior Is SetEffect) Then
    'Assign the set effect values
    Dim setEffect As SetEffect = TryCast(behavior,SetEffect)
    setEffect.Accumulate = Nothing
    Exit For
    End If
    Next
    'Save the presentation file
    ppDoc.Save("Sample.pptx")
    'Close the presentation file
    ppDoc.Close()

    Additive

    Get the behavior Additive value

    Declaration
    BehaviorAdditiveType Additive { get; set; }
    Property Value
    Type
    BehaviorAdditiveType
    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.ChangeFillColor, 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 ISetEffect)
    {
    // Assign the set effect values
    ISetEffect setEffect = (behavior as ISetEffect);
    setEffect.Additive = BehaviorAdditiveType.NotDefined;
    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.ChangeFillColor, 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 set effect
    If (TypeOf behavior Is SetEffect) Then
    'Assign the set effect values
    Dim setEffect As SetEffect = TryCast(behavior,SetEffect)
    setEffect.Additive = BehaviorAdditiveType.NotDefined
    Exit For
    End If
    Next
    'Save the presentation file
    ppDoc.Save("Sample.pptx")
    'Close the presentation file
    ppDoc.Close()

    Properties

    Get the properties values of behavior

    Declaration
    IBehaviorProperties Properties { get; }
    Property Value
    Type
    IBehaviorProperties
    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.ChangeFillColor, 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 ISetEffect)
    {
    // Assign the set effect values
    ISetEffect setEffect = (behavior as ISetEffect);
    IBehaviorProperties setProperties = setEffect.Properties;
    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.ChangeFillColor, 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 set effect
    If (TypeOf behavior Is SetEffect) Then
    'Assign the set effect values
    Dim setEffect As SetEffect = TryCast(behavior,SetEffect)
    Dim setProperties As IBehaviorProperties = setEffect.Properties
    Exit For
    End If
    Next
    'Save the presentation file
    ppDoc.Save("Sample.pptx")
    'Close the presentation file
    ppDoc.Close()

    Timing

    Get the list of timing values of behavior

    Declaration
    ITiming Timing { get; set; }
    Property Value
    Type
    ITiming
    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.ChangeFillColor, 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 ISetEffect)
    {
    // Assign the set effect values
    ISetEffect setEffect = (behavior as ISetEffect);
    ITiming setTiming = setEffect.Timing;
    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.ChangeFillColor, 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 set effect
    If (TypeOf behavior Is SetEffect) Then
    'Assign the set effect values
    Dim setEffect As SetEffect = TryCast(behavior,SetEffect)
    Dim setTiming As ITiming = setEffect.Timing
    Exit For
    End If
    Next
    'Save the presentation file
    ppDoc.Save("Sample.pptx")
    'Close the presentation file
    ppDoc.Close()
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved