/Main/src/DynamicDataDisplay/Common/Auxiliary/ValueStoreConverter.cs
C# | 30 lines | 24 code | 6 blank | 0 comment | 0 complexity | c590cc128ed23191e35a1798617deacb MD5 | raw file
Possible License(s): CC-BY-SA-3.0
1using System; 2using System.Collections.Generic; 3using System.Linq; 4using System.Text; 5using System.Windows.Data; 6using System.Globalization; 7 8namespace Microsoft.Research.DynamicDataDisplay 9{ 10 public sealed class ValueStoreConverter : IValueConverter 11 { 12 13 #region IValueConverter Members 14 15 public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 16 { 17 ValueStore store = (ValueStore)value; 18 string key = (string)parameter; 19 20 return store[key]; 21 } 22 23 public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 24 { 25 throw new NotSupportedException(); 26 } 27 28 #endregion 29 } 30}