BindingBase.FallbackValue 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 value used when the binding cannot produce a source value (e.g. path not found, conversion failure).
public:
property System::Object ^ FallbackValue { System::Object ^ get(); void set(System::Object ^ value); };
public object FallbackValue { get; set; }
member this.FallbackValue : obj with get, set
Public Property FallbackValue As Object
Property Value
The fallback value used instead of the target property's default value when source resolution fails entirely.
Remarks
FallbackValue is applied when the binding engine fails to obtain a value (e.g., missing source, unresolved path, or type conversion failure within the binding engine itself). It is not used for errors that occur inside value converters; such errors may be handled by the converter or use different fallback mechanisms. If the source resolves to null, TargetNullValue is applied if set.
Together with TargetNullValue this allows differentiating between a legitimate null value and an unresolved binding.