Werbung

Herkunft

Kurzinformation

Starts animations on a property in any number of inputObjects

Syntax

<# .Synopsis Starts animations on a property in any number of inputObjects .Description Starts animations on a property in any number of inputObjects .Example New-Window "Hello World" -SizeToContent WidthAndHeight -On_Loaded { $this | Start-Animation -property "FontSize" -animation ( New-DoubleAnimation -From 10 -To 100 -Duration (New-TimeSpan -Seconds 1) ) } -show .Parameter inputObject An object with DependencyProperties that can be animated. .Parameter property The name of the property to animate .Parameter animation The animation to run on the property #> param( [Parameter(ValueFromPipeline=$true)] $inputObject, [Parameter(Mandatory=$true)] [PSObject[]]$property, [Windows.Media.Animation.AnimationTimeline[]] $animation) process { foreach ($p in $property) { if ($p -is [Windows.DependencyProperty]) { $dp = $p } if ($p -is [string]) { $dp = $inputObject.GetType()::"${P}Property" if (-not $dp) { Write-Error "$p not found on $($inputObject.GetType().Fullname)" } } if (-not $dp) { return } if (-not $inputObject.BeginAnimation) { return } foreach ($a in $animation) { $null = $inputObject.BeginAnimation($dp, $a) } } }

Beschreibung

Starts animations on a property in any number of inputObjects

Links

Liste aller Commandlets Mehr über die Windows PowerShell

Bücher zur PowerShell

Buchcover Windows PowerShell 5.0 - Das Praxishandbuch (1. Auflage 2016/5. Auflage Gesamtreihe) Windows PowerShell 5.0 - Das Praxishandbuch (1. Auflage 2016/5. Auflage Gesamtreihe)
Autoren: Dr. Holger Schwichtenberg
erschienen 2016, 996 Seiten, 49,99 €
ISBN: 3446446435
Bestellung: Amazon.de oder im Buchhandel über ISBN 3446446435

Schulungen/Seminare

Offene Seminare zur PowerShell
In-House-Seminare zur PowerShell