找不到“uri”类型。 [英] The type 'uri' was not found.

查看:85
本文介绍了找不到“uri”类型。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我是银光用户的新手,想在我的应用程序中播放视频。我搜索了很多网站,并得到了一些解决方案,但这些解决方案还不够好。



这是我的源代码,请帮帮我。

将源视频添加到clientbin文件夹并直接访问Source属性。



 <  画布    Canvas.Left   =  50   < span class =code-attribute> Canvas.Top   =  420   高度  =  252   名称  =   canvas2   宽度  =  400 >  
< < span class =code-leadattribute> MediaElement
Canvas.Left = 25 Canvas.Top = 20 高度 = 193 名称 = videoplay Sourc e = Wildlife.wmv 宽度 = 332 自动播放 = True / >
< 按钮 Canvas.Left = 170 Canvas.Top < span class =code-keyword> = 223 内容 = 播放 < span class =code-attribute> 高度 = 23 名称 = VdoPlay 宽度 = 75 / >
< / Canvas >







提前致谢。

解决方案

你的来源应该在 Uri [ ^ ]格式



.NET Compact Framework平台注意:

 .NET Compact Framework流程以file://方式为前缀的URI字符串与完整的.NET Framework不同。相对文件:// myfile规范解析为\\myfile。使用file:/// myfile(三个斜杠)在根目录中解析为\ myfile。为确保成功操作,请指定绝对路径信息。





示例:

  //  绝对URI  
来源= http://www.contoso.com/index.htm
// 相对URI
Source = /新/ index.htm的


Hello all,

I am novice user to silver light, want to play a video in my application. I have googled many sites and got some solutions but those are not good enough to solve my problem.

This is my source code and please help me.
Added source video to clientbin folder and accesing directly to Source attribute.

<Canvas Canvas.Left="50" Canvas.Top="420" Height="252" Name="canvas2" Width="400">
                <MediaElement Canvas.Left="25" Canvas.Top="20" Height="193" Name="videoplay" Source="Wildlife.wmv" Width="332" AutoPlay="True"  />
                <Button Canvas.Left="170" Canvas.Top="223" Content="Play" Height="23" Name="VdoPlay" Width="75"  />
            </Canvas>




Thanks in advance.

解决方案

Your Source should be in Uri[^] format

.NET Compact Framework Platform Note:

The .NET Compact Framework processes URI strings prefixed by the file:// scheme differently from the full .NET Framework. A relative file://myfile specification resolves as \\myfile. Using file:///myfile (three slashes) resolves as\myfile in the root directory. To ensure successful operations, specify absolute path information.



Examples:

//absolute URIs
Source="http://www.contoso.com/index.htm"
//relative URIs
Source="/new/index.htm"


这篇关于找不到“uri”类型。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆