TypePresenter.Filter 属性

定义

获取或设置用于显示类型的筛选器。Gets or sets the filter used to show types.

public:
 property Func<Type ^, bool> ^ Filter { Func<Type ^, bool> ^ get(); void set(Func<Type ^, bool> ^ value); };
public Func<Type,bool> Filter { get; set; }
member this.Filter : Func<Type, bool> with get, set
Public Property Filter As Func(Of Type, Boolean)

属性值

Func<Type,Boolean>

具有一个返回值和一个布尔值的委托,该委托表示用于显示类型的筛选器。A delegate with one return value and a Boolean value that represents the filter used to show types.

注解

默认情况下,下面的类型显示在类型演示器/类型浏览器中By default, the following types are shown in the type presenter/type browser

  1. 项目系统方案Project system case

    1. 被引用程序集/项目中的所有公共类型All public types in referenced assemblies/projects

    2. 当前项目中的所有公共类型All public types in current project

  2. 在未打开解决方案的情况下,在 Visual Studio 中打开重新承载应用程序/文件中的独立 XAML 大小写 (文件) Standalone XAML case (file in rehosted application/file opened in Visual Studio without solution opened)

    1. AppDomain 中加载的所有程序集中的所有公共类型All public types in all assemblies loaded in the AppDomain

通过设置筛选器属性,可以限制类型浏览器中显示的类型数量,使其仅显示对您的活动有效的那些类型。By setting the filter property, you can limit the number of types shown in the type browser to only those types that are valid for your activity.

适用于