Sharing Content Using the Sharing Contract
Go Up to VCL
You can share content with a Windows application using the functionality of a Sharing Contract. RAD Studio implements the Share Contract API that allows you to set your application as a sharing source. The shared target has to be a native Windows application.
The implementation of the Sharing Contract in RAD Studio lets you use the Sharing Contract functionality either by using the TSharingContract component or by implementing you own TCustomSharingContract component.
There are many properties that you can share using the Sharing Contract:
- The DataTitle and Description specify the title and the description for the title that appears in the sidebar.
- ImageFile allows you to specify an image to share. You may also provide a custom event handler for the OnTransferImage event, which lets you pass any stream to the target application.
- Other properties allow you to share much more information with the target application. See the Vcl.ShareContract API documentation, Windows Dev Center - Guidelines for sharing content and Windows Dev Center - DataPackage class for more information about the sharing contract.