Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using System.Windows.Data;
|
---|
6 | using System.Globalization;
|
---|
7 |
|
---|
8 | namespace 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 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.