XamlLanguageService.FormatSource メソッド

更新 : 2007 年 11 月

この API は、.NET Framework インフラストラクチャをサポートします。独自に作成したコードから直接使用するためのものではありません。

IMarkupSourceProviderISourceChanger を使用することで、指定された書式指定オプションに基づいてファイルの書式を設定します。

名前空間 :  Microsoft.Xaml
アセンブリ :  Microsoft.Windows.Design.Markup (Microsoft.Windows.Design.Markup.dll 内)

構文

'宣言
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
'使用
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

パラメータ

戻り値

型 : Microsoft.Xaml.SemanticRange

解説

offset が 0 で length が -1 の場合は、ファイル全体に書式が設定されます。

アクセス許可

  • 直前の呼び出し元に対する完全な信頼。このメンバは、部分的に信頼されているコードから使用することはできません。詳細については、「部分信頼コードからのライブラリの使用」を参照してください。

参照

参照

XamlLanguageService クラス

XamlLanguageService メンバ

Microsoft.Xaml 名前空間

その他の技術情報

WPF デザイナの機能拡張