88 references to Duration
PresentationCore (26)
System\Windows\Duration.cs (3)
65
return new
Duration
(timeSpan);
79
return new
Duration
(t1._timeSpan + t2._timeSpan);
107
return new
Duration
(t1._timeSpan - t2._timeSpan);
System\Windows\DurationConverter.cs (1)
76
return new
Duration
(TimeSpan.Parse(valueSpan, cultureInfo));
System\Windows\Media\Animation\Generated\BooleanAnimationUsingKeyFrames.cs (1)
426
return new
Duration
(LargestTimeSpanKeyTime);
System\Windows\Media\Animation\Generated\ByteAnimationUsingKeyFrames.cs (1)
459
return new
Duration
(LargestTimeSpanKeyTime);
System\Windows\Media\Animation\Generated\CharAnimationUsingKeyFrames.cs (1)
425
return new
Duration
(LargestTimeSpanKeyTime);
System\Windows\Media\Animation\Generated\ColorAnimationUsingKeyFrames.cs (1)
459
return new
Duration
(LargestTimeSpanKeyTime);
System\Windows\Media\Animation\Generated\DecimalAnimationUsingKeyFrames.cs (1)
459
return new
Duration
(LargestTimeSpanKeyTime);
System\Windows\Media\Animation\Generated\DoubleAnimationUsingKeyFrames.cs (1)
459
return new
Duration
(LargestTimeSpanKeyTime);
System\Windows\Media\Animation\Generated\Int16AnimationUsingKeyFrames.cs (1)
459
return new
Duration
(LargestTimeSpanKeyTime);
System\Windows\Media\Animation\Generated\Int32AnimationUsingKeyFrames.cs (1)
459
return new
Duration
(LargestTimeSpanKeyTime);
System\Windows\Media\Animation\Generated\Int64AnimationUsingKeyFrames.cs (1)
459
return new
Duration
(LargestTimeSpanKeyTime);
System\Windows\Media\Animation\Generated\MatrixAnimationUsingKeyFrames.cs (1)
425
return new
Duration
(LargestTimeSpanKeyTime);
System\Windows\Media\Animation\Generated\ObjectAnimationUsingKeyFrames.cs (1)
425
return new
Duration
(LargestTimeSpanKeyTime);
System\Windows\Media\Animation\Generated\Point3DAnimationUsingKeyFrames.cs (1)
460
return new
Duration
(LargestTimeSpanKeyTime);
System\Windows\Media\Animation\Generated\PointAnimationUsingKeyFrames.cs (1)
459
return new
Duration
(LargestTimeSpanKeyTime);
System\Windows\Media\Animation\Generated\QuaternionAnimationUsingKeyFrames.cs (1)
460
return new
Duration
(LargestTimeSpanKeyTime);
System\Windows\Media\Animation\Generated\RectAnimationUsingKeyFrames.cs (1)
459
return new
Duration
(LargestTimeSpanKeyTime);
System\Windows\Media\Animation\Generated\Rotation3DAnimationUsingKeyFrames.cs (1)
460
return new
Duration
(LargestTimeSpanKeyTime);
System\Windows\Media\Animation\Generated\SingleAnimationUsingKeyFrames.cs (1)
459
return new
Duration
(LargestTimeSpanKeyTime);
System\Windows\Media\Animation\Generated\SizeAnimationUsingKeyFrames.cs (1)
459
return new
Duration
(LargestTimeSpanKeyTime);
System\Windows\Media\Animation\Generated\StringAnimationUsingKeyFrames.cs (1)
425
return new
Duration
(LargestTimeSpanKeyTime);
System\Windows\Media\Animation\Generated\Vector3DAnimationUsingKeyFrames.cs (1)
460
return new
Duration
(LargestTimeSpanKeyTime);
System\Windows\Media\Animation\Generated\VectorAnimationUsingKeyFrames.cs (1)
459
return new
Duration
(LargestTimeSpanKeyTime);
System\Windows\Media\MediaPlayerState.cs (1)
395
return new
Duration
(TimeSpan.FromTicks(mediaLength));
PresentationCore.Tests (8)
System\Windows\DurationConverter.Tests.cs (8)
60
yield return new object?[] { "17.22:10:15.4571230", CultureInfo.InvariantCulture, new
Duration
(new TimeSpan(17, 22, 10, 15, 457, 123)), true };
61
yield return new object?[] { "17.22:10:15.4571230", new CultureInfo("ru-RU"), new
Duration
(new TimeSpan(17, 22, 10, 15, 457, 123)), true };
73
Assert.Throws<ArgumentNullException>(() => converter.ConvertTo(new
Duration
(new TimeSpan(17, 22, 10, 15, 457, 123)), destinationType: null!));
88
Assert.Throws<NotSupportedException>(() => converter.ConvertTo(null, null, new
Duration
(new TimeSpan(17, 22, 10, 15, 457, 123)), destinationType));
106
yield return new object?[] { new
Duration
(TimeSpan.FromTicks(6488853448000)), CultureInfo.InvariantCulture, "07:12:14:45.3448 " };
107
yield return new object?[] { new
Duration
(TimeSpan.FromTicks(5624853448000)), new CultureInfo("ru-RU"), " 6:12:14:45,3448 " };
109
yield return new object?[] { new
Duration
(TimeSpan.FromTicks(5184000000000)), CultureInfo.InvariantCulture, " 6 " };
111
yield return new object?[] { new
Duration
(TimeSpan.FromTicks(223200000000)), CultureInfo.InvariantCulture, " 6:12 " };
PresentationFramework (6)
System\Windows\Controls\ProgressBar.cs (1)
250
Duration = new
Duration
(translateTime + pauseTime),
System\windows\Documents\CaretElement.cs (1)
900
Duration blinkDuration = new
Duration
(TimeSpan.FromMilliseconds(blinkInterval * 2));
System\Windows\Media\Animation\Generated\ThicknessAnimationUsingKeyFrames.cs (1)
463
return new
Duration
(LargestTimeSpanKeyTime);
System\Windows\VisualStateManager.cs (2)
373
dynamic.Duration = new
Duration
(TimeSpan.Zero);
781
private static readonly Duration DurationZero = new
Duration
(TimeSpan.Zero);
System\Windows\VisualTransition.cs (1)
87
private Duration _generatedDuration = new
Duration
(new TimeSpan());
PresentationFramework.Aero (20)
Microsoft\Windows\Themes\BulletChrome.cs (6)
121
Duration duration = new
Duration
(TimeSpan.FromSeconds(0.2));
174
Duration duration = new
Duration
(TimeSpan.FromSeconds(0.3));
269
Duration duration = new
Duration
(TimeSpan.FromSeconds(0.3));
345
Duration duration = new
Duration
(TimeSpan.FromSeconds(0.3));
438
Duration duration = new
Duration
(TimeSpan.FromSeconds(0.3));
503
Duration duration = new
Duration
(TimeSpan.FromSeconds(0.3));
Microsoft\Windows\Themes\ButtonChrome.cs (6)
114
Duration duration = new
Duration
(TimeSpan.FromSeconds(0.3));
145
Duration duration = new
Duration
(TimeSpan.FromSeconds(0.2));
209
Duration duration = new
Duration
(TimeSpan.FromSeconds(0.3));
246
Duration duration = new
Duration
(TimeSpan.FromSeconds(0.2));
300
Duration duration = new
Duration
(TimeSpan.FromSeconds(0.1));
333
Duration duration = new
Duration
(TimeSpan.FromSeconds(0.1));
Microsoft\Windows\Themes\ListBoxChrome.cs (2)
138
Duration duration = new
Duration
(TimeSpan.FromSeconds(0.3));
150
Duration duration = new
Duration
(TimeSpan.FromSeconds(0.2));
Microsoft\Windows\Themes\ProgressBarHighlightConverter.cs (1)
91
Duration = new
Duration
(translateTime + pauseTime),
Microsoft\Windows\Themes\ScrollChrome.cs (5)
108
Duration duration = new
Duration
(TimeSpan.FromSeconds(0.3));
145
Duration duration = new
Duration
(TimeSpan.FromSeconds(0.2));
226
Duration duration = new
Duration
(TimeSpan.FromSeconds(0.2));
251
Duration duration = new
Duration
(TimeSpan.FromSeconds(0.3));
328
Duration duration = new
Duration
(TimeSpan.FromSeconds(0.3));
PresentationFramework.Aero2 (20)
Microsoft\Windows\Themes\BulletChrome.cs (6)
121
Duration duration = new
Duration
(TimeSpan.FromSeconds(0.2));
174
Duration duration = new
Duration
(TimeSpan.FromSeconds(0.3));
269
Duration duration = new
Duration
(TimeSpan.FromSeconds(0.3));
345
Duration duration = new
Duration
(TimeSpan.FromSeconds(0.3));
438
Duration duration = new
Duration
(TimeSpan.FromSeconds(0.3));
503
Duration duration = new
Duration
(TimeSpan.FromSeconds(0.3));
Microsoft\Windows\Themes\ButtonChrome.cs (6)
114
Duration duration = new
Duration
(TimeSpan.FromSeconds(0.3));
145
Duration duration = new
Duration
(TimeSpan.FromSeconds(0.2));
209
Duration duration = new
Duration
(TimeSpan.FromSeconds(0.3));
246
Duration duration = new
Duration
(TimeSpan.FromSeconds(0.2));
300
Duration duration = new
Duration
(TimeSpan.FromSeconds(0.1));
333
Duration duration = new
Duration
(TimeSpan.FromSeconds(0.1));
Microsoft\Windows\Themes\ListBoxChrome.cs (2)
138
Duration duration = new
Duration
(TimeSpan.FromSeconds(0.3));
150
Duration duration = new
Duration
(TimeSpan.FromSeconds(0.2));
Microsoft\Windows\Themes\ProgressBarHighlightConverter.cs (1)
91
Duration = new
Duration
(translateTime + pauseTime),
Microsoft\Windows\Themes\ScrollChrome.cs (5)
108
Duration duration = new
Duration
(TimeSpan.FromSeconds(0.3));
145
Duration duration = new
Duration
(TimeSpan.FromSeconds(0.2));
226
Duration duration = new
Duration
(TimeSpan.FromSeconds(0.2));
251
Duration duration = new
Duration
(TimeSpan.FromSeconds(0.3));
328
Duration duration = new
Duration
(TimeSpan.FromSeconds(0.3));
PresentationFramework.AeroLite (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\ProgressBarBrushConverter.cs (1)
109
Duration = new
Duration
(TimeSpan.FromMilliseconds(milliseconds)), // Repeat every 3 seconds
PresentationFramework.Classic (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\ProgressBarBrushConverter.cs (1)
109
Duration = new
Duration
(TimeSpan.FromMilliseconds(milliseconds)), // Repeat every 3 seconds
PresentationFramework.Luna (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\ProgressBarBrushConverter.cs (1)
109
Duration = new
Duration
(TimeSpan.FromMilliseconds(milliseconds)), // Repeat every 3 seconds
PresentationFramework.Royale (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\ProgressBarBrushConverter.cs (1)
109
Duration = new
Duration
(TimeSpan.FromMilliseconds(milliseconds)), // Repeat every 3 seconds
Roslyn.VisualStudio.DiagnosticsWindow (2)
PerfMargin\StatusIndicator.xaml.cs (2)
48
private static readonly DoubleAnimation s_growAnimation = new DoubleAnimation(1.0, new
Duration
(TimeSpan.FromSeconds(1.0)), FillBehavior.HoldEnd);
49
private static readonly DoubleAnimation s_shrinkAnimation = new DoubleAnimation(0.0, new
Duration
(TimeSpan.FromSeconds(0.33333)), FillBehavior.HoldEnd);
System.Windows.Controls.Ribbon (2)
Microsoft\Windows\Controls\Ribbon\RibbonGroup.cs (2)
1311
opacityAnimation = new DoubleAnimation(1, new
Duration
(twoTenthsOfASeconds));
1316
opacityAnimation = new DoubleAnimation(0, new
Duration
(fourTenthsOfASeconds));