سؤال

ولقد سمعت أن بوويرشيل ISE يستخدم نفس محرر نصوص WPF كما VisualStudio 2010 وأوسلو IntelliPad. وأنا أعلم أنك يمكن أن تمتد هذا المحرر في VisualStudio عن طريق إدخال تحكم WPF الخاصة بك في ملف XAML المحرر. سؤالي الآن: هل هذا أيضا ممكن مع PowerShellISE؟ هل أي شخص يحاول القيام بذلك حتى الآن؟

هل كانت مفيدة؟

المحلول

وصحيح أنه من نفس عنصر التحكم. أنا لا أعتقد أنك يمكن إدراج تحكم WPF الخاصة بك. ومع ذلك، فإن ISE غير programatic تماما ولها طراز الكائن التي يمكنك استخدامها لتخصيص 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