PowerShell ISE WPF 제어 라이닝
-
06-07-2019 - |
문제
PowerShell ISE가 VisualStudio 2010 및 Oslo Intellipad와 동일한 WPF 텍스트 편집기를 사용한다고 들었습니다. Editor의 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
제휴하지 않습니다 StackOverflow