New to Telerik UI for WPFStart a free 30-day trial

Converts a Thickness value to a negative offset used for layout positioning.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.dll

Syntax:

C#
public class NegativeOffsetConverter : IValueConverter

Inheritance: objectNegativeOffsetConverter

Implements: IValueConverter

Constructors

C#
public NegativeOffsetConverter()

Methods

Converts a Thickness to a numeric offset based on the side(s) specified in parameter.

C#
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
Parameters:valueobject

The source value, expected to be a Thickness instance.

targetTypeType

The type of the binding target property.

parameterobject

A comma-separated list of thickness sides to evaluate (for example, "Left" or "Bottom"). Defaults to "Left" when not provided.

cultureCultureInfo

The culture to use in the converter.

Returns:

object

A double representing the calculated offset, or 0d when value is not a Thickness.

Not supported. Throws NotImplementedException.

C#
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
Parameters:valueobjecttargetTypeTypeparameterobjectcultureCultureInfoReturns:

object