Interface IColorOffset
Represents the color offset.
Namespace: Syncfusion.Presentation
Assembly: Syncfusion.Presentation.Portable.dll
Syntax
public interface IColorOffset
Properties
Value0
Get the color offset value0
Declaration
float Value0 { 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.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 IColorEffect)
{
// Assign the color effect values
IColorEffect colorEffect = (behavior as IColorEffect);
float color1 = colorEffect.By.Value0;
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 color effect
If (TypeOf behavior Is ColorEffect) Then
'Assign the color effect values
Dim colorEffect As ColorEffect = TryCast(behavior,ColorEffect)
Dim color1 As Single = colorEffect.By.Value0
Exit For
End If
Next
'Save the presentation file
ppDoc.Save("Sample.pptx")
'Close the presentation file
ppDoc.Close()
Value1
Get the color offset value1
Declaration
float Value1 { 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.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 IColorEffect)
{
// Assign the color effect values
IColorEffect colorEffect = (behavior as IColorEffect);
float color2 = colorEffect.By.Value1;
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 color effect
If (TypeOf behavior Is ColorEffect) Then
'Assign the color effect values
Dim colorEffect As ColorEffect = TryCast(behavior,ColorEffect)
Dim color2 As Single = colorEffect.By.Value1
Exit For
End If
Next
'Save the presentation file
ppDoc.Save("Sample.pptx")
'Close the presentation file
ppDoc.Close()
Value2
Get the color offset value2
Declaration
float Value2 { 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.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 IColorEffect)
{
// Assign the color effect values
IColorEffect colorEffect = (behavior as IColorEffect);
float color3 = colorEffect.By.Value2;
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 color effect
If (TypeOf behavior Is ColorEffect) Then
'Assign the color effect values
Dim colorEffect As ColorEffect = TryCast(behavior,ColorEffect)
Dim color3 As Single = colorEffect.By.Value2
Exit For
End If
Next
'Save the presentation file
ppDoc.Save("Sample.pptx")
'Close the presentation file
ppDoc.Close()