Share via


TransferTarget.IsEnabled Property

Definition

The IsEnabled property indicates whether the transfer target is currently enabled and available for use.

public:
 property bool IsEnabled { bool get(); };
/// [Windows.Foundation.Metadata.Experimental]
/// [get: Windows.Foundation.Metadata.Experimental]
bool IsEnabled();
[Windows.Foundation.Metadata.Experimental]
public bool IsEnabled { [Windows.Foundation.Metadata.Experimental] get; }
var boolean = transferTarget.isEnabled;
Public ReadOnly Property IsEnabled As Boolean

Property Value

Boolean

bool

A bool value that is true if the transfer target is enabled; otherwise, false.

Attributes

Examples

Example: Checking if a Transfer Target is Enabled

if (transferTarget.IsEnabled)
{
    Console.WriteLine("The transfer target is enabled.");
}
else
{
    Console.WriteLine("The transfer target is not enabled.");
}

Remarks

The IsEnabled property allows applications to determine whether a transfer target can be used for sharing operations. This is useful for filtering out targets that are temporarily unavailable.

Usage Notes:

  • Check the IsEnabled property before attempting to invoke a transfer target.
  • An IsEnabled value of false may indicate that the target is disabled or not ready to accept data.

Applies to

See also