DataPackage.SetData(String, Object) Method
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.
Sets the data contained in the DataPackage in a RandomAccessStream format.
public:
virtual void SetData(Platform::String ^ formatId, Platform::Object ^ value) = SetData;
void SetData(winrt::hstring const& formatId, IInspectable const& value);
public void SetData(string formatId, object value);
function setData(formatId, value)
Public Sub SetData (formatId As String, value As Object)
Parameters
- formatId
-
String
Platform::String
winrt::hstring
Specifies the format of the data. We recommend that you set this value by using the StandardDataFormats class.
- value
-
Object
Platform::Object
IInspectable
Specifies the content that the DataPackage contains.
Remarks
To add data using this method, your app must convert the data into an object. You must also specify a formatId that target apps can use to request the data. Note that the target app can request this data only if it knows the formatId.
This method is often used when you use a delegate function to share data. For more information, see How to support pull operations.
Applies to
Váš názor
https://aka.ms/ContentUserFeedback.
Připravujeme: V průběhu roku 2024 budeme postupně vyřazovat problémy z GitHub coby mechanismus zpětné vazby pro obsah a nahrazovat ho novým systémem zpětné vazby. Další informace naleznete v tématu:Odeslat a zobrazit názory pro