开发者

WebBrowserTask fails to open .doc

开发者 https://www.devze.com 2023-04-12 03:36 出处:网络
I\'m trying to open a document hosted in dropbox public folder.开发者_如何转开发 I\'m able to open same document from IE. But when i try to do same, my program does nothing.

I'm trying to open a document hosted in dropbox public folder.开发者_如何转开发 I'm able to open same document from IE. But when i try to do same, my program does nothing. Same program works fine with pdf hosted at same place. In case of pdf, browsertask launches pdf reader(app i installed). Here is the code i use:

WebBrowserTask webBrowserTask = new WebBrowserTask();
webBrowserTask.Uri = new Uri("http://dl.dropbox.com/u/1967630/new.doc", UriKind.Absolute);            
webBrowserTask.Show();

And in case of any problem, how do i handle "failed to navigate" kind of case?


It works fine for me for both Emulator and Device on mango.

However, if you are on NoDo, you must do the code like this:

WebBrowserTask webBrowserTask = new WebBrowserTask();
webBrowserTask.URL = "http://dl.dropbox.com/u/1967630/new.doc";            
webBrowserTask.Show();
0

精彩评论

暂无评论...
验证码 换一张
取 消