TransferTarget.IsEnabled Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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
IsEnabledproperty before attempting to invoke a transfer target. - An
IsEnabledvalue offalsemay indicate that the target is disabled or not ready to accept data.