Monday, March 17, 2014

Update: SkyDrive/OneDrive Browse Task

Well, the SkyDrive rename to OneDrive is a month or so old already, so I finally decided to update my file browser package on Nuget!  In addition to the renaming, I also added the ability to set/replace the images used for file types.  This could be useful if you are going for a specific look for your app, or just to show an image for a custom extension that you use.  I haven't renamed the package since that's how the lookup is done for updates, but I may create a second package soon with the new name.  Hopefully people will still find it!

UPDATE: I never mentioned how to set the file extension images!  It's pretty easy really.  Use the extension itself (not including the dot) and a URI pointing to the image:

SkyDriveBrowserTask.AddCustomFileTypeImage("xlf", new Uri("/Assets/xlf-icon.png", UriKind.Relative));

Notice that it's a static method on the task class, not on instances of the task.  Set it once for your app when it starts up, and any task in that session will use it.


No comments:

Post a Comment