- vmwrapperexpress.zip
- VmWrapperExpress
- AppIcon
- VmWrapperExpress.ico
- Documentation
- Pending Issues.docx
- SetupVmWrapperExpress
- Debug
- Release
- setup.exe
- SetupVmWrapperExpress.msi
- SetupVmWrapperExpress.vdproj
- VmWrapperExpress.sln
- VmWrapperExpress
- App.xaml
- App.xaml.cs
- bin
- Debug
- Release
- Templates
- CollectionWrapper.cs.template
- ObjectWrapper.cs.template
- ViewModelBase.cs.template
- VmCollectionBase.cs.template
- VmObjectBase.cs.template
- VmWrapperExpress.exe
- VmWrapperExpress.pdb
- VmWrapperExpress.vshost.exe
- VmWrapperExpress.vshost.exe.manifest
- DomainModel
- obj
- Debug
- Release
- Properties
- Services
- Templates
- CollectionWrapper.cs.template
- ObjectWrapper.cs.template
- ReadMe.txt
- ViewModelBase.cs.template
- VmCollectionBase.cs.template
- VmObjectBase.cs.template
- Utility
- View
- ViewModel
- VmWrapperExpress.csproj
- VmWrapperExpress.csproj.user
- VmWrapperExpress.ico
- vmwrapperdemo.zip
- VmWrapperDemo
- _ReSharper.VmWrapperDemo
- CachesImage.bin
- ProjectModel
- ProjectModel.dat
- TodoCache
- WebsiteFileReferences
- .version
- WordIndex.New
- Xaml
- CacheProvider.dat
- VmWrapperDemo.4.5.resharper.user
- VmWrapperDemo.Domain
- VmWrapperDemo.sln
- VmWrapperDemo.ViewModel
- VmWrapperDemo
|
using System;
using System.Globalization;
using System.Windows.Data;
namespace VmWrapperDemo.ViewModel
{
[ValueConversion(typeof (decimal), typeof (string))]
public class AmountConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value == null) throw new ArgumentNullException("value");
if (targetType == null) throw new ArgumentNullException("targetType");
var amount = (decimal) value;
var result = String.Format(" (Amount = {0})", amount.ToString("C"));
return result;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
David Veeneman is a financial planner and software developer. He is the author of "The Fortune in Your Future" (McGraw-Hill 1998). His company, Foresight Systems, develops planning and financial software.