다음을 통해 공유


ViewFilter.CanReformat Method

Determines whether the source can be reformatted by the language service.

Namespace:  Microsoft.VisualStudio.Package
Assemblies:   Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
  Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
  Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)

Syntax

‘선언
Public Overridable Function CanReformat As Boolean
‘사용 방법
Dim instance As ViewFilter
Dim returnValue As Boolean

returnValue = instance.CanReformat()
public virtual bool CanReformat()
public:
virtual bool CanReformat()
abstract CanReformat : unit -> bool 
override CanReformat : unit -> bool 
public function CanReformat() : boolean

Return Value

Type: System.Boolean
true if the source can be reformatted, otherwise false: either the debugger is active or the language service does not support reformatting.

Remarks

A reformat can occur if the user explicitly selects Format Selection of Format Document, or it can occur implicitly as the result of entering a character that triggers an auto-format action (for example, entering a "}" could cause all of the text between the "}" and the opening "{" to be indented properly).

The base method determines if a debugger is active (returning false if it is active) and if not, returns the value from the EnableFormatSelection property.

.NET Framework Security

See Also

Reference

ViewFilter Class

ViewFilter Members

Microsoft.VisualStudio.Package Namespace