Поделиться через


FeatureManager.PendingConnectors Property

Gets an enumeration of all connectors that have not been activated yet because they are waiting on context items or services.

Namespace:  Microsoft.Windows.Design.Features
Assembly:  Microsoft.Windows.Design.Extensibility (in Microsoft.Windows.Design.Extensibility.dll)

Syntax

'Declaration
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>

Property Value

Type: System.Collections.Generic.IEnumerable<FeatureConnectorInformation>
An enumeration of feature connectors that are waiting for services or context items to become available in the editing context.

Examples

The following sample code shows how to use the FeatureManager class to access the running and pending connectors. For a complete code listing, see How to: Create a Custom Feature Connector.

' 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 Security

See Also

Reference

FeatureManager Class

Microsoft.Windows.Design.Features Namespace

FeatureProvider

FeatureConnector<TFeatureProviderType>

Other Resources

Feature Providers and Feature Connectors

Understanding WPF Designer Extensibility