Prev | Current Page 701 | Next

Rob Cameron and Dale Michalk

"Pro ASP.NET 3.5 Server Controls and AJAX Components"


The ImageMetaDataConverter Class
The ImageMetaData class is the type of the ImageInfo member on the TitledThumbnail control.
The ImageMetaData class is a complex type that contains subproperties when viewed in the
property browser, as shown in Figure 11-2. It contains the following properties:
??? ImageDate
??? ImageLocation
??? ImageLongDescription
??? PhotographerFullName
As we mentioned previously, unlike the other scalar types, ImageLocation is also a complex
type of type Location. LocationConverter customizes how properties of type Location display
in the Properties window.
Notice that the ImageMetaData class has a type converter associated with it:
[TypeConverter(typeof(ImageMetaDataConverter))]
public class ImageMetaData
{
This type converter inherits from System.ComponentModel.ExpandableObjectConverter,
which provides functionality to display types with properties as subproperties similar to how
the Font type displays in the Properties tool window. This type converter can also be used to
alter what data shows for the value of the ImageInfo property listed in the property browser.
In Figure 11-2, you see that the data shown in the property field consists of ImageInfo??™s
subproperties, separated by a comma.


Pages:
689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713