2009-06-20 2 views
2

PowerShell ISE는 Visual Studio 2010 및 Oslo IntelliPad와 동일한 WPF 텍스트 편집기를 사용한다고 들었습니다. 편집자의 XAML 파일에 사용자 고유의 WPF 컨트롤을 삽입하여 VisualStudio에서이 편집기를 확장 할 수 있다는 것을 알고 있습니다. 지금 내 질문 : PowerShellISE에서도 가능합니까? 아직 아무도 이걸하려고하지 않았습니까?PowerShell ISE WPF 컨트롤 인라인

답변

4

사실은 같은 컨트롤입니다. 난 당신이 자신의 WPF 컨트롤을 삽입 할 수 있다고 생각하지 않습니다. 그러나 ISE는 완벽하게 프로그래밍 방식이며 ISE를 사용자 지정하는 데 사용할 수있는 개체 모델이 있습니다. $ psise 변수를 사용하여 객체 모델에 액세스 할 수 있습니다. 당신은 psise.options

나는 그들이 사용하고있는 .xaml 파일을 보지 못했다
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

$로 많은 옵션을 조정할 수 있습니다, 그래서 나는 앤디가 유일한 확장 점은 $의 psise 객체를 통해입니다 올바른 생각합니다. .xaml 파일이 어셈블리 중 하나로 컴파일 된 것 같습니다. –

+0

Visual Studio 편집기는 .xaml 파일이 아닙니다. –

+0

Andy의 전체적인 점은 정확합니다. 이것은 동일한 편집기이지만 확장 성 메커니즘입니다 (여전히 MEF라고 생각하지만, 버전은 구식입니다.)는 기본적으로 다른 어셈블리를로드하지 않도록 설정되었습니다. –