BindingBase.StringFormat Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the string format for this binding.
public:
property System::String ^ StringFormat { System::String ^ get(); void set(System::String ^ value); };
public string StringFormat { get; set; }
member this.StringFormat : string with get, set
Public Property StringFormat As String
Property Value
A string specifying the format for the value of this binding.
Remarks
Used for providing a display format for the binding value or compositing the value with other text. Implementors of BindingBase decide how the string format is utilized, but all support standard Format conventions.
Binding allows for one argument for its singular value.
A simple example showing compositing text and determining the display format for the value with a Binding
Label label = new Label();
label.AddBinding (new Binding (Label.TextProperty, "Price") {
StringFormat = "Price: {0:C2}"
});