Share via


TextSelection.SmartFormat (Método)

Da formato a las líneas de texto seleccionadas en función del lenguaje utilizado.

Espacio de nombres:  EnvDTE
Ensamblado:  EnvDTE (en EnvDTE.dll)

Sintaxis

'Declaración
Sub SmartFormat
void SmartFormat()
void SmartFormat()
abstract SmartFormat : unit -> unit
function SmartFormat()

Comentarios

Las Re- sangrías o los formatos la selección de texto, incluidas las líneas delimitador y finaliza activos se encuentran, según la Configuración global de la sangría automática. SmartFormat hace que la selección incluya las líneas completas en los extremos.

Ejemplos

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

Seguridad de .NET Framework

Vea también

Referencia

TextSelection Interfaz

EnvDTE (Espacio de nombres)