C# Class MediaOwl.Core.FiveStarRatingConverter

An IValueConverter which converts a double-Rating from 0 to 5 to a double-Rating from 0 to 1.
Inheritance: IValueConverter
Datei anzeigen Open project: Slesa/Playground

Public Methods

Method Description
Convert ( object value, Type targetType, object parameter, CultureInfo culture ) : object

Convertst to 20 % of the initial value

ConvertBack ( object value, Type targetType, object parameter, CultureInfo culture ) : object

Converts to 500 % of the initial value

Method Details

Convert() public method

Convertst to 20 % of the initial value
public Convert ( object value, Type targetType, object parameter, CultureInfo culture ) : object
value object The source data being passed to the target.
targetType System.Type The of data expected by the target dependency property.
parameter object An optional parameter to be used in the converter logic.
culture System.Globalization.CultureInfo The culture of the conversion.
return object

ConvertBack() public method

Converts to 500 % of the initial value
public ConvertBack ( object value, Type targetType, object parameter, CultureInfo culture ) : object
value object The source data being passed to the target.
targetType System.Type The of data expected by the target dependency property.
parameter object An optional parameter to be used in the converter logic.
culture System.Globalization.CultureInfo The culture of the conversion.
return object