ImageGear .NET v25.2 - Updated
ImageGear.Web Assembly / ImageGear.Web.UI Namespace / ImGearThumbnailList Class / ThumbnailCaptionFormat Property




In This Topic
    ThumbnailCaptionFormat Property (ImGearThumbnailList)
    In This Topic
    Gets or sets the string format for thumbnail caption for all the thumbnails in the control.
    Syntax
    'Declaration
     
    <CategoryAttribute("ImGearThumbnailList Properties")>
    <BrowsableAttribute(True)>
    <DefaultValueAttribute("{DC}:{PC} {P#}")>
    <DescriptionAttribute("Gets or sets the thumbnail caption format.")>
    Public Property ThumbnailCaptionFormat As String
    'Usage
     
    Dim instance As ImGearThumbnailList
    Dim value As String
     
    instance.ThumbnailCaptionFormat = value
     
    value = instance.ThumbnailCaptionFormat
    [Category("ImGearThumbnailList Properties")]
    [Browsable(true)]
    [DefaultValue("{DC}:{PC} {P#}")]
    [Description("Gets or sets the thumbnail caption format.")]
    public string ThumbnailCaptionFormat {get; set;}
    [Category("ImGearThumbnailList Properties")]
    [Browsable(true)]
    [DefaultValue("{DC}:{PC} {P#}")]
    [Description("Gets or sets the thumbnail caption format.")]
    public: __property string* get_ThumbnailCaptionFormat();
    public: __property void set_ThumbnailCaptionFormat( 
       string* value
    );
    [Category("ImGearThumbnailList Properties")]
    [Browsable(true)]
    [DefaultValue("{DC}:{PC} {P#}")]
    [Description("Gets or sets the thumbnail caption format.")]
    public:
    property String^ ThumbnailCaptionFormat {
       String^ get();
       void set (    String^ value);
    }
    Remarks

    The default value is an empty string

    This property gets or sets the string format for thumbnail caption for all the thumbnails in the control. The custom formatting supports templated caption. The string will be parsed with the following characters to mean as in the following list. Note:The internal parser expects the characters to be encased within {}. To specify a single literal brace character in the format, specify two opening or closing braces. This follows .NET rules for escaping curly braces.

    • DC - Document Caption: Maps to the value obtained via DocumentCaptionFieldproperty used for data binding. You may choose to add some other string besides the value obtained via DocumentCaptionField. The default value will be the DocumentIdentifier property. If you do not want the DocumentIdentifier displayed as caption, then make sure that this value is set correctly or do not choose this option for the caption. On the client, this maps to the 'caption' property of the 'ImGearDocument' class.
    • PC - Page Caption: Maps to the value obtained via PageCaptionField property used for data binding. You may choose to add some other string besides the value obtained via PageCaptionField. On the client, this maps to the 'casption' property of the 'ImGearPage' class.
    • P# - Page Index: Defines the page index in the client 'ImGearPageCollection' class contained in the client 'ImGearDocument' class. The index is zero based so it will be incremented by one for display in the caption.
    • PP - Page Count: Defines the total number of pages in the client 'ImGearPageCollection' object contained in the client ImGearDocument class.

    Note: Each thumbnail displays only one line of caption. If the caption is too long to fit, it will be truncated. If your caption text is too long to fit, you can choose to increase the width of the thumbnail. The only browser that wraps the longer caption is IE7. All newer browsers truncate the text.

    Property value = "Title-{DC}:{PC} {P#} of {PP}"

    where {PC} was set to “Claims Page ”

    The resulting caption for thumbnails will be like:

    "Title-MyImage.tif:Claims Page 1 of 150"

    Property value = "{DC}:Page {P#}"

    The resulting caption for thumbnails will be:

    "MyImage.tif:Page 1"

    Example
    Property value = "Title-{DC}:{PC} {P#} of {PP}"

    where {PC} was set to “Claims Page ”

    The resulting caption for thumbnails will be like:

    "Title-MyImage.tif:Claims Page 1 of 150"

    Property value = "{DC}:Page {P#}"

    The resulting caption for thumbnails will be:

    "MyImage.tif:Page 1"

    See Also