C# Class InTheHand.ApplicationModel.DataTransfer.DataPackage

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

Public Methods

Method 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 method

Constructor that creates a new DataPackage.
public DataPackage ( ) : System
return System

GetView() public method

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

SetApplicationLink() public method

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.
return void

SetData() public method

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.
return void

SetDataProvider() public method

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.
return void

SetText() public method

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

SetWebLink() public method

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.
return void