Extending Graph Behavior

Jun 21, 2009 at 6:04 PM

In the blog (http://www.mscui.net/Blog/Default.aspx)

On April 17th, a step that I don't understand.

The step: create a new class using Visual Studio called DateFormatConverter

I don't understand why does it have to add "IValueConverter" after "public class DateFormatConverter :" ?

And I type the codes, it said couldn't find IValueConverter, so what I have to do than?

Jun 22, 2009 at 1:19 PM



IValueConverter is an interface http://msdn.microsoft.com/en-us/library/ms173156.aspx


Information about that particular interface is here http://msdn.microsoft.com/en-us/library/system.windows.data.ivalueconverter(VS.95).aspx


One of the things it says is that IValueConverter is in the System.Windows.Data namespace, so you'll need to add the following in the new class:

using System.Windows.Data;







Jun 22, 2009 at 2:09 PM

Thank you for your answer.

After I add "using System.Windows.Data; ", the question has be solved.

But there is a nother question occurred:
On "public object IValueConverter.Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)" and "public object IValueConverter.ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)" , the system said "public" isn't invalid here.

What's wrong?

And the next sentence: link the newly created converter while binding the date value.

Should I add the codes to the original XAML or I have to create a new XAML?