Show / Hide Table of Contents

Property FallbackBehavior

| Improve this Doc View Source

FallbackBehavior

Gets or sets the fallback behavior for this MapConverter. This is a dependency property.

Declaration
public FallbackBehavior FallbackBehavior { get; set; }
Property Value
Type Description
FallbackBehavior

The fallback behavior of this MapConverter.

Remarks

The fallback behavior determines how this MapConverter treats failed conversions. ReturnUnsetValue (the default) specifies that any failed conversions should return System.Windows.DependencyProperty.UnsetValue, which can be used in combination with Binding.FallbackValue to default bindings to a specific value.

Alternatively, FallbackBehavior.ReturnOriginalValue can be specified so that failed conversions result in the original value being returned. This is useful where mappings are only necessary for a subset of the total possible values. Mappings can be specified where necessary and other values can be returned as is by the MapConverter by setting the fallback behavior to ReturnOriginalValue.

  • Improve this Doc
  • View Source
Back to top Copyright © Weifen Luo | DevZest