ITypeDescriptorFilterService.FilterProperties(IComponent, IDictionary) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
篩選元件透過 TypeDescriptor 所公開的屬性。
public:
bool FilterProperties(System::ComponentModel::IComponent ^ component, System::Collections::IDictionary ^ properties);
public bool FilterProperties (System.ComponentModel.IComponent component, System.Collections.IDictionary properties);
abstract member FilterProperties : System.ComponentModel.IComponent * System.Collections.IDictionary -> bool
Public Function FilterProperties (component As IComponent, properties As IDictionary) As Boolean
參數
- component
- IComponent
要為其篩選屬性的元件。
- properties
- IDictionary
可以修改的屬性字典。
傳回
如果要對篩選的屬性集進行快取,則為 true
;否則為 false
。
備註
當使用者要求元件的一組屬性時,會呼叫這個方法。 屬性會新增至字典,其中屬性名稱為索引鍵,而對應的 PropertyDescriptor 物件則做為值。 此服務的實作者可以在字典中新增、移除或改變屬性專案。
給實施者的注意事項
只有在需要時才傳回 false
,因為對型別描述元篩選服務的重複查詢可能會降低效能。
適用於
另請參閱
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應