C# Class InTheHand.ApplicationModel.DataTransfer.DataPackage

Contains the data that a user wants to exchange with another app.
Afficher le fichier Open project: inthehand/Charming Class Usage Examples

Méthodes publiques

Méthode Description
DataPackage ( ) : System

Constructor that creates a new DataPackage.

GetView ( ) : DataPackageView

Returns a DataPackageView object. This object is a read-only copy of the DataPackage object.

SetApplicationLink ( Uri value ) : void

Sets the application link that a DataPackage contains.

Whenever possible, you should set this property. This URI represents a deep link that takes the user back to the currently displayed content. A source app provides a value for this property, and a target app reads the value. Use this property to indicate the source of the shared content.

The scheme of this URI must not be http or https. The app sharing this URI must be capable of being the default handler, although it may not be set as the default handler.

SetData ( string formatId, object value ) : void

Sets the data contained in the DataPackage.

SetDataProvider ( string formatId, DataProviderHandler delayRenderer ) : void

Sets a delegate to handle requests from the target app.

SetText ( string value ) : void

Sets the text that a DataPackage contains.

SetWebLink ( Uri value ) : void

Sets the web link that a DataPackage contains.

Whenever possible, you should set this property. A source app provides a value for this property, and a target app reads the value. Use this property to indicate the source of the shared content.

Method Details

DataPackage() public méthode

Constructor that creates a new DataPackage.
public DataPackage ( ) : System
Résultat System

GetView() public méthode

Returns a DataPackageView object. This object is a read-only copy of the DataPackage object.
public GetView ( ) : DataPackageView
Résultat DataPackageView

SetApplicationLink() public méthode

Sets the application link that a DataPackage contains.
Whenever possible, you should set this property. This URI represents a deep link that takes the user back to the currently displayed content. A source app provides a value for this property, and a target app reads the value. Use this property to indicate the source of the shared content.

The scheme of this URI must not be http or https. The app sharing this URI must be capable of being the default handler, although it may not be set as the default handler.

public SetApplicationLink ( Uri value ) : void
value System.Uri A URI with a scheme that isn't http or https that's handled by the source app.
Résultat void

SetData() public méthode

Sets the data contained in the DataPackage.
public SetData ( string formatId, object value ) : void
formatId string Specifies the format of the data. /// We recommend that you set this value by using the StandardDataFormats class.
value object Specifies the content that the DataPackage contains.
Résultat void

SetDataProvider() public méthode

Sets a delegate to handle requests from the target app.
public SetDataProvider ( string formatId, DataProviderHandler delayRenderer ) : void
formatId string Specifies the format of the data. /// We recommend that you set this value by using the StandardDataFormats class.
delayRenderer DataProviderHandler A delegate that is responsible for processing requests from a target app.
Résultat void

SetText() public méthode

Sets the text that a DataPackage contains.
public SetText ( string value ) : void
value string The text.
Résultat void

SetWebLink() public méthode

Sets the web link that a DataPackage contains.
Whenever possible, you should set this property. A source app provides a value for this property, and a target app reads the value. Use this property to indicate the source of the shared content.
public SetWebLink ( Uri value ) : void
value System.Uri A URI with an http or https scheme that corresponds to the content being displayed to the user.
Résultat void