KeyTime.FromPercent Method (Double)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Creates a new KeyTime instance, with the KeyTimeType property initialized to the value of the specified parameter.

Namespace:   System.Windows.Media.Animation
Assembly:  PresentationCore (in PresentationCore.dll)

public static KeyTime FromPercent(
	double percent


Type: System.Double

The value of the new KeyTime.

Return Value

Type: System.Windows.Media.Animation.KeyTime

A new KeyTime instance, initialized to the value of percent.

Exception Condition

percent is less than 0.0 or greater than 1.0.

The percent parameter is passed as a double, ranging between the values 0.0 and 1.0.

.NET Framework
Available since 3.0
Return to top