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 to use when the binding is unable to return a value.
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 default value is UnsetValue.
Remarks
A binding returns a value successfully if:
The path to the binding source resolves successfully.
The value converter, if any, is able to convert the resulting value.
The resulting value is valid for the binding target (target) property.
If 1 and 2 return DependencyProperty.UnsetValue, the target property is set to the value of the FallbackValue, if one is available. If there is no FallbackValue, the default value of the target property is used.
The value DependencyProperty.UnsetValue is not considered a successful return value.
XAML Text Usage
<object FallbackValue="fallbackValue" />
- or -
<object>
<object.FallbackValue>
fallbackValue
</object.FallbackValue>
</object>
XAML Values
fallbackValue
An attribute or object element value of the same type as the target property. See that type's documentation for XAML usage information. That type may or may not support attribute syntax for its values, or may or may not support object element syntax (which requires a parameterless constructor on that type). The target property type will therefore influence which syntax you use for the value of the FallbackValue property.
Applies to
See also
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om