ImageMan.Net Version 3 Summer 2012 Release
FilterString Property
See Also  Example Send Feedback
DTI.ImageMan.Codecs Namespace > GifEncoder Class : FilterString Property





Glossary Item Box

Gets a file filter string compatible with the OpenImageDialog or OpenFileDialog classes.

Syntax

Visual Basic (Declaration) 
Public Overridable ReadOnly Property FilterString As System.String
Visual Basic (Usage)Copy Code
Dim instance As GifEncoder
Dim value As System.String
 
value = instance.FilterString
C# 
public virtual System.string FilterString {get;}
JScript 
public function get FilterString : System.String
Managed Extensions for C++ 
public: __property virtual System.string* get_FilterString();
C++/CLI 
public:
virtual property System.String^ FilterString {
   System.String^ get();
}

Property Value

Returns a String containing the filter.

Remarks

Returns a filter string containing a pipe "|" delimited filter string. Starts with a description of the format and is followed with extension filters. Several of these filters can be chained together. Finally replace the pipes "|" with null zeros prior to passing to the dialog. The following code creates a filter String to pass to the common dialog.
   StringBuilder filterString = new StringBuilder();

   foreach (ImDecoder im in RegisteredDecoders.Decoders)
   {
       filterString.Append(im.FilterString);
       filterString.Append("|");
   }
   filterString.Replace("|", "\0");

Example

The following code creates a filter String to pass to the common dialog.
C#Copy Code
StringBuilder filterString = new StringBuilder();

foreach (ImDecoder im in RegisteredDecoders.Decoders)
{
    filterString.Append(im.FilterString);
    filterString.Append("|");
}
filterString.Replace("|", "\0");

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© 2014 Data Techniques, Inc. All Rights Reserved.