Represents a connection with a casting device.
public ref class CastingConnection sealed : IClosable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)] /// [Windows.Foundation.Metadata.DualApiPartition(version=167772160)] /// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)] /// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)] class CastingConnection sealed : IClosable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)] [Windows.Foundation.Metadata.DualApiPartition(version=167772160)] [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)] [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)] public sealed class CastingConnection : System.IDisposable
Public NotInheritable Class CastingConnection Implements IDisposable
Windows 10 requirements
Windows 10 (introduced in 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
Windows.Foundation.UniversalApiContract (introduced in v1.0)
Get an instance of this class by calling CreateCastingConnection.
Gets the casting device with which a connection has been made.
Gets and sets the content source that is being casted through the connection to the casting device. The content can be set and changed at any time and doing so does not disconnect the connection.
Gets the current state of the connection.
Closes the casting connection.
Terminates a casting connection. The content that was rendering remotely returns to the local element that you retrieved the casting source from.
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Starts the process of casting to a casting device. When called, this method pairs the c sting device, if necessary, and verifies access to the casting device with the user. If the user denies the app access to the device, casting fails. Otherwise, a connection is established, and content is sent to the device. During this time, the connection state changes to connecting, then to connected. If a casting source is set, the state changes to rendering once playback begins.
Indicates an error occurred while attempting to make a casting connection.
Indicates a change in the State property.