// --------------------------------------------------------------------------------------------------------------------
//
// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
//
//
// A Converter to get the Display Name of each options tab.
//
// --------------------------------------------------------------------------------------------------------------------
namespace HandBrakeWPF.Converters.Options
{
using System;
using System.Globalization;
using System.Windows.Data;
using HandBrake.ApplicationServices.Utilities;
using HandBrakeWPF.Model;
///
/// A Converter to get the Display Name of each options tab.
///
public class OptionsTabNameConverter : IValueConverter
{
///
/// The convert.
///
///
/// The value.
///
///
/// The target type.
///
///
/// The parameter.
///
///
/// The culture.
///
///
/// The .
///
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return EnumHelper.GetDisplay((OptionsTab)value);
}
///
/// The convert back.
///
///
/// The value.
///
///
/// The target type.
///
///
/// The parameter.
///
///
/// The culture.
///
///
/// The .
///
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
return EnumHelper.GetValue(value.ToString());
}
}
}