質問

PowerShell ISEはVisualStudio 2010およびOslo IntelliPadと同じWPFテキストエディターを使用していると聞きました。エディターのXAMLファイルに独自のWPFコントロールを挿入することにより、VisualStudioでこのエディターを拡張できることを知っています。私の質問:PowerShellISEでもこれは可能ですか?誰もまだこれをやろうとしましたか?

役に立ちましたか?

解決

同じコントロールであることは事実です。独自の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                 : True
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top