我听说奥斯陆ISE使用与VisualStudio 2010和PowerShell IntelliPad相同的WPF文本编辑器。我知道您可以通过在编辑器的XAML文件中插入您自己的VisualStudio控件来扩展此编辑器。我现在的问题是:这在PowerShellISE上也是可能的吗?有没有人试过这样做?
发布于 2009-06-21 04:13:11
它确实是相同的控件。我不相信你可以插入你自己的WPF控件。但是,ISE完全是程序化的,并且具有可用于自定义ISE的对象模型。您可以使用$psise变量访问对象模型。您可以使用$psise.options调整许多选项
1 > $psise.options
SelectedScriptPaneState : Right
ShowToolBar : True
TokenColors : {[Attribute, #FF84A7C1], [Command, #FFFFFF60],
[CommandArgument, #FFFFFFFF], [CommandParameter
, #FFFFDE00]...}
DefaultOptions : Microsoft.PowerShell.Host.ISE.ISEOptions
FontSize : 16
FontName : consolas
ErrorForegroundColor : #FFFF0000
ErrorBackgroundColor : #00FFFFFF
WarningForegroundColor : #FFFF8C00
WarningBackgroundColor : #00FFFFFF
VerboseForegroundColor : #FF0000FF
VerboseBackgroundColor : #00FFFFFF
DebugForegroundColor : #FF0000FF
DebugBackgroundColor : #00FFFFFF
OutputPaneBackgroundColor : #FF000000
OutputPaneTextBackgroundColor : #FF000000
OutputPaneForegroundColor : #FFFFFFFF
CommandPaneBackgroundColor : #FF000000
ScriptPaneBackgroundColor : #FF000000
ScriptPaneForegroundColor : #FF000000
ShowWarningForDuplicateFiles : True
ShowWarningBeforeSavingOnRun : True
UseLocalHelp : True
CommandPaneUp : Truehttps://stackoverflow.com/questions/1022181
复制相似问题