~ubuntu-branches/ubuntu/karmic/moon/karmic

« back to all changes in this revision

Viewing changes to class/Microsoft.SilverlightControls/Controls/Src/ListBox/DisplayMemberValueConverter.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2009-02-14 12:01:08 UTC
  • Revision ID: james.westby@ubuntu.com-20090214120108-06539vb25vhbd8bn
Tags: upstream-1.0
Import upstream version 1.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright © Microsoft Corporation. 
 
2
// This source is subject to the Microsoft Source License for Silverlight Controls (March 2008 Release).
 
3
// Please see http://go.microsoft.com/fwlink/?LinkID=111693 for details.
 
4
// All other rights reserved. 
 
5
 
 
6
using System.Windows.Data;
 
7
 
 
8
#if !WPF 
 
9
namespace System.Windows.Controls
 
10
 
11
    /// <summary>
 
12
    /// IValueConverter that converts any object to its ToString equivalent
 
13
    /// </summary> 
 
14
    internal class DisplayMemberValueConverter : IValueConverter
 
15
    {
 
16
        /// <summary> 
 
17
        /// Converts a value. 
 
18
        /// </summary>
 
19
        /// <param name="value">The value produced by the binding source.</param> 
 
20
        /// <param name="targetType">The type of the binding target property.</param>
 
21
        /// <param name="parameter">The converter parameter to use.</param>
 
22
        /// <param name="culture">The culture to use in the converter.</param> 
 
23
        /// <returns>A converted value.</returns>
 
24
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
 
25
        { 
 
26
            return (null != value) ? value.ToString() : ""; 
 
27
        }
 
28
 
 
29
        /// <summary>
 
30
        /// Converts a value.
 
31
        /// </summary> 
 
32
        /// <param name="value">The value that is produced by the binding target.</param>
 
33
        /// <param name="targetType">The type to convert to.</param>
 
34
        /// <param name="parameter">The converter parameter to use.</param> 
 
35
        /// <param name="culture">The culture to use in the converter.</param> 
 
36
        /// <returns>A converted value.</returns>
 
37
        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) 
 
38
        {
 
39
            throw new NotImplementedException();
 
40
        } 
 
41
    }
 
42
}
 
43
#endif