共用方式為


FeatureManager.PendingConnectors 屬性

會取得尚未啟動之所有連接器的列舉,這些連接器都在等候內容項目或服務。

命名空間:  Microsoft.Windows.Design.Features
組件:  Microsoft.Windows.Design.Extensibility (在 Microsoft.Windows.Design.Extensibility.dll 中)

語法

'宣告
Public ReadOnly Property PendingConnectors As IEnumerable(Of FeatureConnectorInformation)
    Get
public IEnumerable<FeatureConnectorInformation> PendingConnectors { get; }
public:
property IEnumerable<FeatureConnectorInformation^>^ PendingConnectors {
    IEnumerable<FeatureConnectorInformation^>^ get ();
}
member PendingConnectors : IEnumerable<FeatureConnectorInformation>
function get PendingConnectors () : IEnumerable<FeatureConnectorInformation>

屬性值

型別:System.Collections.Generic.IEnumerable<FeatureConnectorInformation>
功能連接器的列舉,這些連接器都在等候使用編輯內容中的服務或內容項目。

範例

下列範例程式碼顯示如何使用 FeatureManager 類別,以存取執行中與暫止的連接器。 如需完整的程式碼清單,請參閱 HOW TO:建立自訂功能連接器

' Binds the activatedFeatures and pendingFeatures controls
' the FeatureManager's RunningConnectors and PendingConnectors\
' properties.
Private Sub Bind()
    activatedFeatures.Items.Clear()
    pendingFeatures.Items.Clear()

    Dim info As FeatureConnectorInformation
    For Each info In featManager.RunningConnectors
        activatedFeatures.Items.Add(info)
    Next info

    For Each info In featManager.PendingConnectors
        pendingFeatures.Items.Add(info)
    Next info

End Sub
// Binds the activatedFeatures and pendingFeatures controls
// the FeatureManager's RunningConnectors and PendingConnectors\
// properties.
private void Bind() 
{
    activatedFeatures.Items.Clear();
    pendingFeatures.Items.Clear();

    foreach (FeatureConnectorInformation info in 
        featManager.RunningConnectors) 
    {
        activatedFeatures.Items.Add(info);
    }

    foreach (FeatureConnectorInformation info in 
        featManager.PendingConnectors) 
    {
        pendingFeatures.Items.Add(info);
    }
}

.NET Framework 安全性

請參閱

參考

FeatureManager 類別

Microsoft.Windows.Design.Features 命名空間

FeatureProvider

FeatureConnector<TFeatureProviderType>

其他資源

功能提供者和功能連接器

了解 WPF 設計工具擴充性