public object GetFormat(Type formatType) { // Determine whether custom formatting object is requested. if (formatType == typeof(ICustomFormatter)) { return new MatrixFormatter(); } return null; }