Can HyperLinkButton in silverlight navigate a NAS or Local-file uri?

Asked
Viewd1936

2

In my silverlight application I have a section like this:

<HyperlinkButton Content="{Binding MediaFile.FileName}" 
 TargetName="_blank" 
 NavigateUri="{Binding ., Converter={StaticResource MediaFileToFullPathConverter}}" 
 Style="{StaticResource HyperLinkButtonStyle}"/>

For testing purposes I use local navigation paths to the ui (C:\blabla\file.txt). In my real world scenario I will provide NAS links (\PcX\file.txt).

However when I click on the C:\blabla\file.txt I get an UnauthorizedAccessException error. When the link is url it is invoked perfectly (opening a window and loading a page as a harm). Finally, when I write C:\blabla\file.txt in browser's address bar, the file is accessed perfectly.

Is silverlight so much isolated that it cannot trigger a new window with the address of a local file?

Do you have any clue?

Thx, Aggelos

1 ответов

0

Я скажу «да, это так», но похоже, вы сможете обойти это с помощью свойства EnableNavigation:

http://msdn.microsoft.com/en-us/library/system.windows.controls.hyperlinkbutton(VS.95).aspx?ppud=4 (см. примечание)