Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.
Using ISourceChanger for IMarkupSourceProvider, formats the file based on the specified formatting options.
Namespace: Microsoft.Xaml
Assembly: Microsoft.Windows.Design.Markup (in Microsoft.Windows.Design.Markup.dll)
Syntax
'Declaration
Public Shared Function FormatSource ( _
source As IMarkupSourceProvider, _
offset As Integer, _
length As Integer, _
options As FormattingOptions, _
indentText As String, _
tabWidth As Integer, _
margin As Integer _
) As SemanticRange
'Usage
Dim source As IMarkupSourceProvider
Dim offset As Integer
Dim length As Integer
Dim options As FormattingOptions
Dim indentText As String
Dim tabWidth As Integer
Dim margin As Integer
Dim returnValue As SemanticRange
returnValue = XamlLanguageService.FormatSource(source, _
offset, length, options, indentText, _
tabWidth, margin)
public static SemanticRange FormatSource(
IMarkupSourceProvider source,
int offset,
int length,
FormattingOptions options,
string indentText,
int tabWidth,
int margin
)
public:
static SemanticRange FormatSource(
IMarkupSourceProvider^ source,
int offset,
int length,
FormattingOptions options,
String^ indentText,
int tabWidth,
int margin
)
public static function FormatSource(
source : IMarkupSourceProvider,
offset : int,
length : int,
options : FormattingOptions,
indentText : String,
tabWidth : int,
margin : int
) : SemanticRange
Parameters
- offset
Type: System.Int32
- length
Type: System.Int32
- options
Type: Microsoft.Xaml.FormattingOptions
- indentText
Type: System.String
- tabWidth
Type: System.Int32
- margin
Type: System.Int32
Return Value
Type: Microsoft.Xaml.SemanticRange
The updated offset and length in a SemanticRange.
Remarks
If offset is 0 and length is -1, the entire file will be formatted.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.