Integrating With The Windows 8 Experiences
-
Upload
rami-sarieddine -
Category
Documents
-
view
229 -
download
0
description
Transcript of Integrating With The Windows 8 Experiences
![Page 1: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/1.jpg)
![Page 2: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/2.jpg)
and more
![Page 3: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/3.jpg)
![Page 4: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/4.jpg)
![Page 5: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/5.jpg)
![Page 6: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/6.jpg)
![Page 7: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/7.jpg)
![Page 8: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/8.jpg)
demo
![Page 9: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/9.jpg)
![Page 10: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/10.jpg)
![Page 11: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/11.jpg)
![Page 12: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/12.jpg)
![Page 13: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/13.jpg)
![Page 14: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/14.jpg)
![Page 15: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/15.jpg)
![Page 16: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/16.jpg)
demo
![Page 17: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/17.jpg)
![Page 18: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/18.jpg)
![Page 19: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/19.jpg)
![Page 20: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/20.jpg)
![Page 21: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/21.jpg)
![Page 22: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/22.jpg)
demo
![Page 23: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/23.jpg)
![Page 24: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/24.jpg)
![Page 25: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/25.jpg)
![Page 26: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/26.jpg)
dataTransferManager.addEventListener("datarequested", function (e) {
…// Common propertiesvar request = e.request;request.data.properties.title = "Title for data"; request.data.properties.description = "Description of the data"; request.data.properties.thumbnail = thumbnail; // of type StreamReference
// Common methods request.data.setText("Text to share");request.data.setHtml("<HTML …>");request.data.setUri(uri /* of type Uri */);request.data.setBitmap(stream /* RandomAccessStream */);
// Custom data request.data.setText("FormatID", "Text to share");request.data.setData("FormatID", datastream /* RandomAccessStream */);
![Page 27: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/27.jpg)
![Page 28: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/28.jpg)
![Page 29: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/29.jpg)
// set up data transfer managervar dataTransferManager =
Windows.ApplicationModel.DataTransfer.DataTransferManager.getForCurrentView();
// create event listener to be called on to fill out data packagedataTransferManager.addEventListener("datarequested", function (e) {
// fill in data package with what to sharevar request = e.request;request.data.properties.title = "Title for data"; request.data.properties.description = "Description of the data"; request.data.setText("Text to share");...});
![Page 30: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/30.jpg)
demo
![Page 31: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/31.jpg)
Share Target
![Page 32: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/32.jpg)
![Page 33: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/33.jpg)
![Page 34: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/34.jpg)
<!– extension needs to be added to package.appxmanifest -->
<Extensions>
<Extension Category="windows.shareTarget" StartPage="shareTarget.html">
<ShareTarget><SupportedFileTypes>
<FileType>.jpg</FileType>
</SupportedFileTypes>
<DataFormat>text</DataFormat>
</ShareTarget></Extension>
</Extensions>
...
// activation function in shareTarget.js
function activated(e) {
if (e.kind === Windows.ApplicationModel.Activation.ActivationKind.shareTarget) {
share = e.shareOperation;
document.querySelector('.metadata h1').textContent = share.data.properties.title;
document.querySelector('.metadata p').textContent = share.data.properties.description;
![Page 35: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/35.jpg)
![Page 36: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/36.jpg)
demo
![Page 37: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/37.jpg)
![Page 38: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/38.jpg)
![Page 39: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/39.jpg)
function scenario2AddSettingsFlyout() {
WinJS.Application.onsettings = function (e) {
e.detail.applicationcommands = { "helpDiv": { title: "Help",
href: "/html/2-SettingsFlyout-Help.html" } };
WinJS.UI.SettingsFlyout.populateSettings(e);
};
}
![Page 40: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/40.jpg)
demo
![Page 41: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/41.jpg)
![Page 42: Integrating With The Windows 8 Experiences](https://reader033.fdocuments.net/reader033/viewer/2022052910/559b84e21a28ab29458b46f3/html5/thumbnails/42.jpg)
Thank you