摘要:
修改IIS在IIS中添加.xap的 MIME类型IIS6中,网站-》右键菜单-》属性->HTTP头页签-》MIME类型新建.xapapplication/xap 阅读全文
摘要:
很多时候,需要编码动态设置显示图片,方法上不是那么直接,从网上找到合适的方法,这里做一下记录。需要引用的命名空间System.Windows.Media.Imageing;代码:Uri uri = new Uri("image/aaa.png",UriKind.RelativeOrAbsolute);ImageSource imgSource = new BitmapImage(uri);img.Source = imgSource;搞定。 阅读全文
摘要:
System.Text.UTF8Encoding UTF8 = new UTF8Encoding(); byte[] bytes =UTF8.GetBytes("ABCD一二三四");string str = UTF8.GetString(bytes, 0, bytes.Length);注意:不能这样使用:UTF8.GetString(bytes),这个方法在SilverLight中是Protected的,编译失败 阅读全文