using System; namespace Core.Common.Controls.Table { /// /// Wrapper for ICustomFormatter, so that IFormatProvider won't have to be implemented. /// http://documentation.devexpress.com/#WindowsForms/CustomDocument3045 /// public class TableViewCellFormatterProvider : IFormatProvider { private readonly ICustomFormatter formatter; public TableViewCellFormatterProvider(ICustomFormatter formatter) { this.formatter = formatter; } /// /// Returns an object that provides formatting services for the specified type. /// /// /// An instance of the object specified by , /// if the implementation can supply that type of object; otherwise, null. /// /// An object that specifies the type of format object to return. public object GetFormat(Type formatType) { return formatter; } } }