Share via


BindingSource.IsGreedy Property

Definition

Gets a value indicating whether or not a source is greedy. A greedy source will bind a model in a single operation, and will not decompose the model into sub-properties.

public:
 property bool IsGreedy { bool get(); };
public bool IsGreedy { get; }
member this.IsGreedy : bool
Public ReadOnly Property IsGreedy As Boolean

Property Value

Remarks

For sources based on a IValueProvider, setting IsGreedy to false will most closely describe the behavior. This value is used inside the default model binders to determine whether or not to attempt to bind properties of a model.

Set IsGreedy to true for most custom IModelBinder implementations.

If a source represents an IModelBinder which will recursively traverse a model's properties and bind them individually using IValueProvider, then set IsGreedy to true.

Applies to