namespace VideoBrowser.Converters
{
using System;
using System.Globalization;
using System.Windows.Data;
using System.Windows.Markup;
///
/// Defines the
///
public class ValueConverter : MarkupExtension, IValueConverter, IMultiValueConverter
{
#region Constructors
///
/// Initializes a new instance of the class.
///
protected ValueConverter()
{
}
#endregion Constructors
#region Methods
///
/// Converts a value.
///
/// The value.
///
public object Convert(object value)
{
return this.Convert(value, null);
}
///
/// Converts a value.
///
/// The value.
/// The parameter.
///
public object Convert(object value, object parameter)
{
return this.Convert(value, null, parameter, null);
}
///
/// Converts a value.
///
/// The value produced by the source.
/// The type of the target property.
/// The converter parameter to use.
/// The culture to use in the converter.
/// The
public virtual object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
///
/// Converts a value.
///
/// The value.
///
public object ConvertBack(object value)
{
return this.ConvertBack(value, null);
}
///
/// Converts a value.
///
/// The value.
/// The parameter.
///
public object ConvertBack(object value, object parameter)
{
return this.ConvertBack(value, null, parameter, null);
}
///
/// Converts a value.
///
/// The value that is produced by the target.
/// The type to convert to.
/// The converter parameter to use.
/// The culture to use in the converter.
/// The
public virtual object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
///
/// Converts a set of values to a single value.
///
/// The values.
///
public object MultiConvert(object[] values)
{
return this.MultiConvert(values, null);
}
///
/// Converts a set of values to a single value.
///
/// The values.
/// The parameter.
///
public object MultiConvert(object[] values, object parameter)
{
return this.MultiConvert(values, null, parameter, null);
}
///
/// Converts source values to a value for the target. The data binding engine calls this method when it propagates the values from source bindings to the target.
///
/// The array of values that the source bindings in the produces. The value indicates that the source binding has no value to provide for conversion.
/// The type of the target property.
/// The converter parameter to use.
/// The culture to use in the converter.
/// The
public virtual object MultiConvert(object[] values, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
///
/// Converts a set of values to a single value.
///
/// The value.
///
public object[] MultiConvertBack(object value)
{
return this.MultiConvertBack(value, null);
}
///
/// Converts a set of values to a single value.
///
/// The value.
/// The parameter.
///
public object[] MultiConvertBack(object value, object parameter)
{
return this.MultiConvertBack(value, null, parameter, null);
}
///
/// Converts a target value to the source binding values.
///
/// The value that the target produces.
/// The array of types to convert to. The array length indicates the number and types of values that are suggested for the method to return.
/// The converter parameter to use.
/// The culture to use in the converter.
/// The
public virtual object[] MultiConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
///
/// Returns this instace.
///
/// Object that can provide services for the markup extension.
/// The
public sealed override object ProvideValue(IServiceProvider serviceProvider)
{
return this;
}
///
/// The Convert
///
/// The value
/// The targetType
/// The parameter
/// The culture
/// The
object IValueConverter.Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return this.Convert(value, targetType, parameter, culture);
}
///
/// The Convert
///
/// The values
/// The targetType
/// The parameter
/// The culture
/// The
object IMultiValueConverter.Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
{
return this.MultiConvert(values, targetType, parameter, culture);
}
///
/// The ConvertBack
///
/// The value
/// The targetType
/// The parameter
/// The culture
/// The
object IValueConverter.ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
return this.ConvertBack(value, targetType, parameter, culture);
}
///
/// The ConvertBack
///
/// The value
/// The targetTypes
/// The parameter
/// The culture
/// The
object[] IMultiValueConverter.ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
{
return this.MultiConvertBack(value, targetTypes, parameter, culture);
}
#endregion Methods
}
}