BindingBase.StringFormat プロパティ

定義

このバインドの文字列の形式を取得または設定します。

public string StringFormat { get; set; }
member this.StringFormat : string with get, set

プロパティ値

String

このバインディングの値の形式を指定する文字列。

注釈

他のテキストのバインディングの値または複合値の表示形式を提供するために使用します。 実装BindingBase、文字列の形式の利用方法の決定が標準をサポートするすべてFormat規則。

Binding その単一の値の 1 つの引数ではできます。

簡単な例の複合文字列の表示と、値の表示形式を決定する、 Binding

Label label = new Label();
label.AddBinding (new Binding (Label.TextProperty, "Price") {
  StringFormat = "Price: {0:C2}"
});

適用対象

こちらもご覧ください