Método TextSelection.SmartFormat

Formata as linhas selecionadas de texto com base no idioma atual.

Namespace:  EnvDTE
Assembly:  EnvDTE (em EnvDTE.dll)

Sintaxe

'Declaração
Sub SmartFormat
void SmartFormat()
void SmartFormat()
abstract SmartFormat : unit -> unit 
function SmartFormat()

Comentários

Re-indents ou formata o texto selecionado, incluindo as linhas que a âncora e active extremidades estão no, de acordo com as configurações globais para recuo inteligente. SmartFormatfaz com que a seleção para incluir as linhas completas nas extremidades.

Exemplos

Sub SmartFormatExample()
   ' Before running this example, open a code document.
   Dim objSel As TextSelection = DTE.ActiveDocument.Selection
   ' Select all code in open document.
   objSel.SelectAll()
   ' Apply smart formatting rules for the language.
   objSel.SmartFormat()
End Sub

Segurança do .NET Framework

Consulte também

Referência

TextSelection Interface

Namespace EnvDTE