Click or drag to resize

BindableExtensionsDefaultIfNullT, TValue Method (BindableBindingT, TValue, TValue)

Gets a binding that returns a defaultValue if the specified binding returns a null value.

Namespace:  Eto.Forms
Assembly:  Eto (in Eto.dll) Version: 2.5.3-dev
Syntax
public static BindableBinding<T, TValue> DefaultIfNull<T, TValue>(
	this BindableBinding<T, TValue> binding,
	TValue defaultValue
)
where T : IBindable
where TValue : class

Parameters

binding
Type: Eto.FormsBindableBindingT, TValue
Source of the binding to get the value.
defaultValue
Type: TValue
Default value to return instead of null.

Type Parameters

T
The type of the bindable object.
TValue
The value type.

Return Value

Type: BindableBindingT, TValue
A new binding that returns a non-null value.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type BindableBindingT, TValue. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also