Quick Build Windows 8 style App 14-sharecontract Overview and principles

Source: Internet
Author: User

The original: Quick Build Windows 8 style Application 14-sharecontract Overview and principles

This post mainly introduces Share contract overview, Share Contract realization Principle, realize Share contract significance.

Share Contract Overview

We all know that Windows 8 contains 3 different classes of Contract:search contract, Share contract, Setting contract. These three application contract provide a consistent programming model for consolidating the Windows 8 experience.

Now Weibo, everyone is a very hot platform, many of us are willing to share what we have seen and heard on these platforms. There may be a number of different applications on our computer, including social classes.

So how do we share these app information with social apps? Windows 8 gives us a powerful share contract that lets you share information between two apps.

Share contract provides a lightweight, context-sensitive sharing experience.

Windows 8 has done the heavy lifting that allows sharing across apps, while sharing the source app should contain as many data formats as possible, and the same shared target should support more formatting.

Share Contract Implementation Principle

Windows 8 has done a lot of work to make it easier for developers to implement share contract in their applications, and developers don't need to be able to share protocols that are shared between different applications. Developers just need to make a statement in their own application that something can be shared or accepted by other applications.

The structure that Windows 8 constructs for share contract contains "source program" and "Target program", the transmission link between "source program" and "Target program" is "Packet", and "packet" exists in "source program".

So how to realize the sharing from the source program to the target program?

1) The source application needs to be registered in the DataTransfer Manager (data Transfer Manager) and declare the Datapackage (packet) to be transmitted;

2) in the sharing agent, the user chooses "Share contract" (share), activates the application;

3) Receive events in the source application and populate the packets;

4) return after completion of the asynchronous call;

5) The shared agent filters out the list of target apps and quick links that can be shared;

6) The user decides which target application or quick link to choose;

7) The shared agent activates the target app for easy sharing, and the target app does not need to be displayed in full screen, just the right size to display it.

8) The target application processes the contents of the acquired packet;

9) When the target application processing is completed, the notification sharing agent is completed, you can remove the target app's shared page;

Implement share contract meaning

1) Our application can establish a connection between users and other applications that they care about;

2) users can share with other applications in the applications we develop;

3) The more applications, the more opportunities to share;

Quick Build Windows 8 style App 14-sharecontract Overview and principles

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.