Werbung

Herkunft

Kurzinformation

Creates a new System.Windows.Controls.GridViewColumn

Syntax

<# .Description Creates a new System.Windows.Controls.GridViewColumn .Synopsis Creates a new System.Windows.Controls.GridViewColumn .Example New-GridViewColumn .Example New-GridViewColumn -OutputXaml .Parameter OutputXaml If Set, will output the object as XAML instead of creating it #> param( ${Header}, ${DisplayMemberBinding}, ${HeaderContainerStyle}, ${HeaderTemplate}, ${HeaderTemplateSelector}, [System.String] ${HeaderStringFormat}, ${CellTemplate}, ${CellTemplateSelector}, [System.Double] ${Width}, [System.Double] ${ActualWidth}, [Switch] ${OutputXaml}, [System.Collections.Hashtable] ${DependencyProperty} ) begin { } process { try { $Object = New-Object System.Windows.Controls.GridViewColumn } catch { throw $_ return } if ($psBoundParameters.ContainsKey("DisplayMemberBinding")) { if ($psBoundParameters.DisplayMemberBinding -is [string]) { $psBoundParameters.DisplayMemberBinding = New-Object Windows.Data.Binding $DisplayMemberBinding } } else { $psBoundParameters.DisplayMemberBinding = New-Object Windows.Data.Binding $Header } if ($PsBoundParameters.ContainsKey("DependencyProperty")) { $null = $PsBoundParameters.Remove("DependencyProperty") foreach ($dp in $dependencyProperty.GetEnumerator()) { if ($dp.Key -is [Windows.DependencyProperty]) { $Null = $Object.SetValue($dp.Key, $dp.Value) } else { $Prop = $Object.GetType()::"$($dp.Key)Property" if ($Prop) { $null = $Object.SetValue( $Prop, $dp.Value -as $Prop.PropertyType ) } } } } Set-Property -property $psBoundParameters -inputObject $Object if ($outputXaml) { $strWrite = New-Object IO.StringWriter ([xml]([Windows.Markup.XamlWriter]::Save($Object))).Save($strWrite) return "$strWrite" } $Object } end { }

Beschreibung

Creates a new System.Windows.Controls.GridViewColumn

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