C# Класс InTheHand.ApplicationModel.DataTransfer.DataPackage

Contains the data that a user wants to exchange with another app.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

DataPackage() публичный Метод

Constructor that creates a new DataPackage.
public DataPackage ( ) : System
Результат System

GetView() публичный Метод

Returns a DataPackageView object. This object is a read-only copy of the DataPackage object.
public GetView ( ) : DataPackageView
Результат DataPackageView

SetApplicationLink() публичный Метод

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.
Результат void

SetData() публичный Метод

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.
Результат void

SetDataProvider() публичный Метод

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.
Результат void

SetText() публичный Метод

Sets the text that a DataPackage contains.
public SetText ( string value ) : void
value string The text.
Результат void

SetWebLink() публичный Метод

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.
Результат void