XslTransformFileEditor.Filter 属性

定义

获取编辑器的 URL 筛选选项,用于对 URL 选择对话框中出现的项进行筛选。Gets the URL filter options for the editor, which is used to filter the items that appear in the URL selection dialog box.

protected:
 virtual property System::String ^ Filter { System::String ^ get(); };
protected override string Filter { get; }
member this.Filter : string
Protected Overrides ReadOnly Property Filter As String

属性值

String

一个字符串,表示对话框的一个或多个 URL 筛选选项。A string that represents one or more URL filter options for the dialog box.

注解

Filter 属性由 EditValue 方法在调用方法时使用 BuildUrl ,此方法在设计时向用户显示 URL 选择对话框。The Filter property is used by the EditValue method when calling the BuildUrl method, which displays the URL selection dialog box to the user at design time.

Filter属性默认值表示对话框的两个 URL 筛选器:一个用于 XML 转换文件 ( * .xsl) ,另一个用于所有文件 (* . *) 。The Filter property default value indicates two URL filters for the dialog box: one for XML transform files (*.xsl) and another for all files (*.*).

若要指定自定义筛选器字符串,请从类派生一个类 XslTransformFileEditor ,然后重写 Filter 属性以返回自定义筛选器字符串。To specify a custom filter string, derive a class from the XslTransformFileEditor class, and then override the Filter property to return the custom filter string.

筛选器字符串包含一个或多个筛选选项。A filter string contains one or more filter options. 每个筛选器选项都包含筛选器的说明,后跟竖线 ( # A0) 和筛选器模式。Each filter option contains a description of the filter, followed by the vertical bar (|) and the filter pattern. 不同筛选选项的字符串用竖线分隔。The strings for different filtering options are separated by the vertical bar.

下面是包含两个筛选器选项的筛选器字符串的示例:Following is an example of a filter string that contains two filter options:

"XML Transform Files (*.xsl)|*.xsl|All Files (*.*)|*.*"."XML Transform Files (*.xsl)|*.xsl|All Files (*.*)|*.*".

您可以通过用分号分隔筛选器模式,在筛选器选项中指定多个筛选器模式。You can specify several filter patterns in a filter option by separating the filter patterns with semicolons. 下面是一个筛选器字符串的示例,其中第一个筛选器选项指定了两个筛选器模式:Following is an example of a filter string in which the first filter option specifies two filter patterns:

"Custom XML Transform Files (*.xs1; *.xs2)|*.xs1;*.xs2|All Files (*.*)|*.*"."Custom XML Transform Files (*.xs1; *.xs2)|*.xs1;*.xs2|All Files (*.*)|*.*".

适用于

另请参阅