Adding a Folder to the Live Mesh Desktop

 

The following appears to be the minimum code required to add a folder to the Live Mesh Desktop.

static void AddFolderToLiveDesktop(LiveOperatingEnvironment loe, String folderName)
{
     Mesh mesh = loe.Mesh;

     MeshObject meshObject = new MeshObject();
     meshObject.Resource.Title = folderName;
     meshObject.Resource.Type = "LiveMeshFolder";
     mesh.MeshObjects.Add(ref meshObject);

     DataFeed dataFeed = new DataFeed();
     dataFeed.Resource.Type = "LiveMeshFiles";
     meshObject.DataFeeds.Add(ref dataFeed);

     meshObject.Update();
}

meshObject.Resource.Type must be set to LiveMeshFolder and dataFeed.Resource.Type must be set to LiveMeshFiles for the mesh object to be displayed on the Live Mesh Desktop.

 

Technorati Tags: ,

About Neil Mackenzie

Cloud Solutions Architect. Microsoft
This entry was posted in Uncategorized. Bookmark the permalink.

One Response to Adding a Folder to the Live Mesh Desktop

  1. Vikas says:

    your blog post has been tagged athttp://delicious.com/LiveFrameworkand linked to Live Framework Forum thread:http://social.msdn.microsoft.com/Forums/en-US/liveframework/thread/828d9a48-239a-4af8-8239-35931e514d37

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s