Binding Class
Provides high-level access to the definition of a binding, which connects the properties of binding target objects and any data source.
Example:
<TextBlock Text="{Binding Source={StaticResource myDataSource}, Path=PersonName}"/>
http://msdn.microsoft.com/en-us/library/system.windows.data.binding.aspx
Methods
From Binding
Name | Description |
---|---|
GetDoNothing | A source property or a converter can return Binding.DoNothing to instruct the binding engine to do nothing when binding gets evaluated |
GetSourceObject | Find data from the appropriate source: Source, ElementName, RelativeSource or DataContext |
Properties
From Binding
Name | Description | |
---|---|---|
![]() |
Converter | Gets or sets the converter to use. If you set the Converter and StringFormat properties, the converter is applied to the data value first, and then the StringFormat is applied |
![]() |
ConverterParameter | Gets or sets the parameter to pass to the Converter |
![]() |
ElementName | Gets or sets the name of the element to use as the binding source object. Only one of the three properties, ElementName, Source, or RelativeSource, should be set for each binding, or a conflict can occur. Setting this property throws an exception if there is a binding source conflict |
![]() |
Mode | Gets or sets the binding mode. It can be set to one of the following values of the BindingMode enumeration:
|
![]() |
Path | Gets or sets the path to the binding source property |
![]() |
RelativeSource | Gets or sets the binding source by specifying its location relative to the position of the binding target. Only one of the three properties, ElementName, Source, or RelativeSource, should be set for each binding, or a conflict can occur. Setting this property throws an exception if there is a binding source conflict |
![]() |
Source | Gets or sets the object to use as the binding source. Only one of the three properties, ElementName, Source, or RelativeSource, should be set for each binding, or a conflict can occur. Setting this property throws an exception if there is a binding source conflict |
![]() |
UpdateSourceTrigger | Gets or sets a value that determines the timing of binding source updates:
|


From BaseBinding
Name | Description | |
---|---|---|
![]() |
FallbackValue | Gets or sets the value to use when the binding is unable to return a value |
![]() |
StringFormat | Gets or sets a string that specifies how to format the binding if it displays the bound value as a string. Examples: <TextBlock Text="{Binding Amount, StringFormat=F2}" />
<TextBlock Text="{Binding Amount, StringFormat={}{0:F2}}" />
<TextBlock Text="{Binding Amount, StringFormat=Value is {0:F2} units}" />
|


Events
Binding has no events