Show / Hide Table of Contents

Struct RepeatBehavior

Describes how a Timeline repeats its simple duration.

Implements
System.IFormattable
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: System.Windows.Media.Animation
Assembly: OpenSilver.dll
Syntax
public struct RepeatBehavior : IFormattable

Constructors

| Improve this Doc View Source

RepeatBehavior(Double)

Initializes a new instance of the RepeatBehavior structure with the specified iteration count.

Declaration
public RepeatBehavior(double count)
Parameters
Type Name Description
System.Double count

A number greater than or equal to 0 that specifies the number of iterations for an animation.

Exceptions
Type Condition
System.ArgumentOutOfRangeException

count evaluates to infinity, a value that is not a number, or is negative.

| Improve this Doc View Source

RepeatBehavior(TimeSpan)

Initializes a new instance of the RepeatBehavior structure with the specified repeat duration.

Declaration
public RepeatBehavior(TimeSpan duration)
Parameters
Type Name Description
System.TimeSpan duration

The total length of time that the Timeline should play (its active duration).

Exceptions
Type Condition
System.ArgumentOutOfRangeException

duration evaluates to a negative number.

Properties

| Improve this Doc View Source

Count

Gets the number of times a Timeline should repeat.

Declaration
public readonly double Count { get; }
Property Value
Type Description
System.Double
Exceptions
Type Condition
System.InvalidOperationException

This RepeatBehavior describes a repeat duration, not an iteration count.

| Improve this Doc View Source

Duration

Gets the total length of time a Timeline should play.

Declaration
public readonly TimeSpan Duration { get; }
Property Value
Type Description
System.TimeSpan

The total length of time a timeline should play.

Exceptions
Type Condition
System.InvalidOperationException

This RepeatBehavior describes an iteration count, not a repeat duration.

| Improve this Doc View Source

Forever

Gets a RepeatBehavior that specifies an infinite number of repetitions.

Declaration
public static readonly RepeatBehavior Forever { get; }
Property Value
Type Description
RepeatBehavior
| Improve this Doc View Source

HasCount

Gets a value that indicates whether the repeat behavior has a specified iteration count.

Declaration
public readonly bool HasCount { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

HasDuration

Gets a value that indicates whether the repeat behavior has a specified repeat duration.

Declaration
public readonly bool HasDuration { get; }
Property Value
Type Description
System.Boolean

true if the instance represents a repeat duration; otherwise, false.

Methods

| Improve this Doc View Source

Equals(Object)

Indicates whether the specified object is equal to this RepeatBehavior.

Declaration
public override bool Equals(object value)
Parameters
Type Name Description
System.Object value

The object to compare with this RepeatBehavior.

Returns
Type Description
System.Boolean

true if value is a RepeatBehavior that represents the same repeat behavior as this RepeatBehavior; otherwise, false.

Overrides
System.ValueType.Equals(System.Object)
| Improve this Doc View Source

Equals(RepeatBehavior)

Returns a value that indicates whether the specified RepeatBehavior is equal to this RepeatBehavior.

Declaration
public bool Equals(RepeatBehavior repeatBehavior)
Parameters
Type Name Description
RepeatBehavior repeatBehavior

The value to compare to this RepeatBehavior.

Returns
Type Description
System.Boolean

true if both the type and repeat behavior of repeatBehavior are equal to this RepeatBehavior; otherwise, false.

| Improve this Doc View Source

Equals(RepeatBehavior, RepeatBehavior)

Indicates whether the two specified RepeatBehavior values are equal.

Declaration
public static bool Equals(RepeatBehavior repeatBehavior1, RepeatBehavior repeatBehavior2)
Parameters
Type Name Description
RepeatBehavior repeatBehavior1

The first value to compare.

RepeatBehavior repeatBehavior2

The second value to compare.

Returns
Type Description
System.Boolean

true if both the type and repeat behavior of repeatBehavior1 are equal to that of repeatBehavior2; otherwise, false.

| Improve this Doc View Source

GetHashCode()

Returns the hash code of this instance.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32
Overrides
System.ValueType.GetHashCode()
| Improve this Doc View Source

ToString()

Returns a string representation of this RepeatBehavior.

Declaration
public override string ToString()
Returns
Type Description
System.String

A string representation of this RepeatBehavior.

Overrides
System.ValueType.ToString()
| Improve this Doc View Source

ToString(IFormatProvider)

Returns a string representation of this RepeatBehavior with the specified format.

Declaration
public string ToString(IFormatProvider formatProvider)
Parameters
Type Name Description
System.IFormatProvider formatProvider

The format used to construct the return value.

Returns
Type Description
System.String

A string representation of this RepeatBehavior.

Operators

| Improve this Doc View Source

Equality(RepeatBehavior, RepeatBehavior)

Indicates whether the two specified RepeatBehavior values are equal.

Declaration
public static bool operator ==(RepeatBehavior repeatBehavior1, RepeatBehavior repeatBehavior2)
Parameters
Type Name Description
RepeatBehavior repeatBehavior1

The first value to compare.

RepeatBehavior repeatBehavior2

The second value to compare.

Returns
Type Description
System.Boolean

true if both the type and repeat behavior of repeatBehavior1 are equal to that of repeatBehavior2; otherwise, false.

| Improve this Doc View Source

Inequality(RepeatBehavior, RepeatBehavior)

Indicates whether the two RepeatBehavior values are not equal.

Declaration
public static bool operator !=(RepeatBehavior repeatBehavior1, RepeatBehavior repeatBehavior2)
Parameters
Type Name Description
RepeatBehavior repeatBehavior1

The first value to compare.

RepeatBehavior repeatBehavior2

The second value to compare.

Returns
Type Description
System.Boolean

true if repeatBehavior1 and repeatBehavior2 are different types or the repeat behavior properties are not equal; otherwise, false.

Explicit Interface Implementations

| Improve this Doc View Source

IFormattable.ToString(String, IFormatProvider)

Declaration
string IFormattable.ToString(string format, IFormatProvider formatProvider)
Parameters
Type Name Description
System.String format
System.IFormatProvider formatProvider
Returns
Type Description
System.String

Implements

System.IFormattable
  • Improve this Doc
  • View Source