2009-06-20 11 views
2

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

答えて

4

同じコントロールであることは間違いありません。自分の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 
+0

で多くのオプションを調整することができ、私は、彼らが使用しているの.xamlファイルを見ていないので、私はアンディが唯一の拡張ポイントは、$ psiseオブジェクトを介してであることを正しいと思います。私は.xamlファイルがアセンブリの1つにコンパイルされていると思います。 –

+0

ビジュアルスタジオエディタは.xamlファイルではありません:) –

+0

Andyの全体的な点は正しいです - それは同じエディタですが、拡張性のメカニズムです(私はそれがまだMEFだと思いますが、それらはバージョンが古くなっています)は基本的に他のアセンブリをロードしないように設定されています。 –

関連する問題