Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
OneWayValueConverter.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 using System;
4 using System.Globalization;
5 using System.Windows.Data;
6 
7 namespace SiliconStudio.Presentation.ValueConverters
8 {
9  /// <summary>
10  /// An abstract implementation of <see cref="ValueConverterBase{T}"/> that does not support <see cref="ConvertBack"/>.
11  /// Invoking <see cref="ConvertBack"/> on this value converter will throw a <see cref="NotSupportedException"/>.
12  /// </summary>
13  /// <typeparam name="T">The type of <see cref="IValueConverter"/> being implemented.</typeparam>
14  public abstract class OneWayValueConverter<T> : ValueConverterBase<T> where T : class, IValueConverter, new()
15  {
16  /// <inheritdoc/>
17  public override sealed object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
18  {
19  throw new NotSupportedException("ConvertBack is not supported with this ValueConverter.");
20  }
21  }
22 }
override sealed object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)