【发布时间】:2015-09-17 00:44:18
【问题描述】:
我发现了这个关于loading .net 4.0 dll in Powershell的问题。
现在我想知道我必须使用哪种 Add-Type,才能使用 PowerShell ISE 中的 WPF Datagrid
在以下工作之前
[xml] $xaml = @"
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<DataGrid Height="200" Width="500" HorizontalAlignment="Left" Margin="12,21,0,0"
Name="McDataGrid" VerticalAlignment="Top" RowHeight="30" ColumnWidth="100" >
</Window>
"@
$reader=(New-Object System.Xml.XmlNodeReader $xaml)
$Form=[Windows.Markup.XamlReader]::Load( $reader )
$Form.ShowDialog()
【问题讨论】:
-
There 似乎是 WPF 工具包的一些示例。
-
拥有 .NET 4.0 的人为什么要安装 WPF 工具包 3.5?两者都有点不同
标签: wpf powershell .net-4.0 datagrid