Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
WinRT library for structured data sharing using data formats
C# JavaScript
branch: master
Failed to load latest commit information.
build Initial source checkin
src Added ExtendedProperties for IThing interface
tools/nuget Initial source checkin
.gitignore Added ExtendedProperties for IThing interface Initial source checkin


WinRT library for structured data sharing (via Share Contract) using data formats.

How To Install


PM> Install-Package Transhipment


Share data - JavaScript

function dataRequested(e) {
    var request = e.request;

    var geo = Transhipment.SchemaFactory.create(Transhipment.Schema.geoCoordinates); = "Polar Bear Provincial Park";
    geo.latitude = "54.596931";
    geo.longitude = "-83.283978"; = "Sample data"; = "data for " + geo.type;

    Transhipment.SchemaFactory.setStructuredData(, geo);

Share data - C#

void DataRequested(DataTransferManager sender, DataRequestedEventArgs args)
    var request = args.Request;

    var geo = SchemaFactory.Create(Schema.GeoCoordinates) as IGeoCoordinates;
    geo.Name = "Polar Bear Provincial Park";
    geo.Latitude = "54.596931";
    geo.Longitude = "-83.283978";

    request.Data.Properties.Title = "Sample data";
    request.Data.Properties.Description = "data for " + geo.Type;

Retrive shared data (share target) - C#

public async void Activate(ShareTargetActivatedEventArgs args)
    shareOperation = args.ShareOperation;
    var geo = await shareOperation.Data.GetStructuredDataAsync(Schema.GeoCoordinates) as IGeoCoordinates;
    if (geo != null)
        DefaultViewModel["ThingName"] = geo.Name;
        DefaultViewModel["Latitude"] = geo.Latitude;
        DefaultViewModel["Longitude"] = geo.Longitude;

    // ...
Something went wrong with that request. Please try again.