AcornPublishing_wpf/9780735619579-master/AppsCodeMarkup/Chapter 16/ExploreDependencyProperties/TypeToString.cs
//---------------------------------------------
// TypeToString.cs (c) 2006 by Charles Petzold
//---------------------------------------------
using System;
using System.Globalization;
using System.Windows.Data;

namespace Petzold.ExploreDependencyProperties
{
   class TypeToString : IValueConverter
    {
        public object Convert(object obj, Type type, object param, 
                              CultureInfo culture)
        {
            return (obj as Type).Name;
        }
        public object ConvertBack(object obj, Type type, object param, 
                                  CultureInfo culture)
        {
            return null;
        }
    }
}
