FileConnectionManagerUIArgs.FileFilter 屬性

定義

取得或設定以管線分隔的字串,其中包含對連接有效的檔案類型。

public:
 property System::String ^ FileFilter { System::String ^ get(); void set(System::String ^ value); };
public string FileFilter { get; set; }
member this.FileFilter : string with get, set
Public Property FileFilter As String

屬性值

String

字串,包含對連接有效的檔案類型。

備註

若為 fileFilter ,預設篩選準則為 [未指定],則會顯示所有檔案。 若要限制顯示的檔案, fileFilter 字串只能指定對連接有效的類型。 例如,在 XML 工作中,您可能只想要讓使用者選取 XML 檔案,所以會 fileFilter 是 *。Stl.

針對每個篩選選項,篩選字串會包含篩選準則的描述,後面接著分隔號(|)和篩選模式。 不同篩選選項的字串會以分隔號分隔。

以下是篩選字串的範例:

「文字檔(* .txt) |* .txt|所有檔案( * . * )|* 。 * 」

您可以使用分號分隔檔案類型,以將數個篩選模式新增至篩選。 例如:

「影像檔案(*。BMP; * 。JPG; * 。GIF) |* 。BMP; * 。JPG; * 。GIF|所有檔案( * . * )|* 。 * 」

這個字串的格式和語法與 fileFilter OpenFileDialog上找到的篩選屬性相同。 如需「OpenFileDialog 類別」的詳細資訊,請參閱 .NET Framework 類別庫。

適用於