我们可以使用[Windows.Markup.XamlReader] :: Load在PowerShell中加载XAML文件,但有没有办法将一些PowerShell脚本指定为代码?
答案 0 :(得分:10)
PowerShell可用于在WPF应用程序中提供功能。查看这些关于使用PowerShell和WPF的精彩博文......
HuddledMasses.Org - PowerBoots - PowerShell的WPF GUI工具包
PowerBoots - Shoes for PowerShell
PowerBoots - Loading XAML Windows in PowerShell 1.0 or 2.0
Windows PowerShell团队博客
http://blogs.msdn.com/powershell/archive/2008/05/25/powershell-and-wpf-wtf.aspx
WPF & PowerShell – Part 1 ( Hello World & Welcome to the Week of WPF )
WPF & PowerShell – Part 2 (Exploring WPF (and the rest of .NET) with Scripts)
WPF & PowerShell -- Part 3 (Handling Events)
WPF & PowerShell -- Part 4 (XAML & Show-Control)
WPF & PowerShell - Part 5 ( Using WPF & PowerShell Modules)
WPF & PowerShell - Part 6 (Running Functions in the Background)
答案 1 :(得分:2)
现在PowerShellPack中还有WPK,这使得在PowerShell中创建WPF UI非常简单有趣。
答案 2 :(得分:0)
虽然我不确定,但我猜不会。鉴于Visual Studio仅将C#和VB公开为用于构建WPF应用程序的语言,这意味着需要在工具级别完成工作,以便将WPF支持添加到语言中。由于.NET语言不能“免费”获得WPF支持,因此PowerShell能够成为WPF UI背后的代码是值得怀疑的。
答案 3 :(得分:0)
目前要查看的地方是http://showui.codeplex.com/SourceControl/list/changesets。
抱歉Show-UI尚未发布。它是PowerBoots和WPK的继承者。