TextSelection.SmartFormat, méthode

Remet en forme les lignes de texte sélectionnées, selon le langage en cours.

Espace de noms :  EnvDTE
Assembly :  EnvDTE (dans EnvDTE.dll)

Syntaxe

'Déclaration
Sub SmartFormat
void SmartFormat()
void SmartFormat()
abstract SmartFormat : unit -> unit
function SmartFormat()

Notes

Les signatures retraits ou les formats la sélection de texte, y compris les lignes d'ancrange et les extrémités actives sont activées, selon des paramètres globaux pour la mise en retrait intelligente. SmartFormat entraîne que la sélection inclue les lignes complètes à la fin.

Exemples

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

Sécurité .NET Framework

Voir aussi

Référence

TextSelection Interface

EnvDTE, espace de noms