随笔分类 -  Silverlight

摘要:属性路径语法 Propertyhttp://msdn.microsoft.com/zh-cn/library/cc645024(v=vs.95).aspx#databinding_sa 阅读全文
posted @ 2012-04-10 21:34 Bug山Bug海 阅读(100) 评论(0) 推荐(0)
摘要:Slider控件如果设置过Value,在XAML中设置ValueChanged事件会出错,需要在load中编码设置 阅读全文
posted @ 2012-03-19 10:38 Bug山Bug海 阅读(119) 评论(0) 推荐(0)
摘要:迁移时代码部分样式没了,具体见http://blog.csdn.net/ssll7759/article/details/7362405通过System.Windows.Browser命名空间下的HtmlPage,HtmlDocument,HtmlElement,HtmlWindow操作浏览器对象(1) HtmlDocument的属性简介 Body:Html的Body对象 Cookies:Cookie字符串 DocumentElement: DocumentUri:Silverlight宿主的html地址 QueryString:页面的查询字符串参数(2) HtmlPage的属性简介 可以使用 阅读全文
posted @ 2012-03-17 11:30 Bug山Bug海 阅读(277) 评论(0) 推荐(0)
摘要:默然Silverlight不支持跨域访问资源,需要在对应Web地址根目录部署策略文件 Sliverlight 跨域策略(clientaccesspolicy.xml) Flash 跨域策略(crossdomoain.xml)的子集clientaccesspolicy.xml<?xml version="1.0" encoding="utf-8"?><access-policy> <cross-domain-access> <policy> <allow-from http-request-header 阅读全文
posted @ 2012-03-05 23:01 Bug山Bug海 阅读(208) 评论(0) 推荐(0)
摘要:1. 一般控件绑定模式默认是Mode=OneWay 但是DataGrid 默认会是双向绑定Mode=TwoWay2.后台DataContext的类型必须是public不然赋值会无效,不明原因 实现 INotifyPropertyChanged接口,集合类需要实现INotifyCollectionChanged,OneWay或TwoWay才能反应 框架中ObservableCollection<T>已实现INotifyCollectionChanged,可直接使用public class Book : INotifyPropertyChanged { public event... 阅读全文
posted @ 2012-03-05 22:47 Bug山Bug海 阅读(173) 评论(0) 推荐(0)
摘要:示例1、样式(App.xaml)<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="Silverlight20.App" > <Application.Resources> <!--全局样式 - 任何地方都可引用--> <!-- Style - 自定义样式资源。用 阅读全文
posted @ 2012-03-05 22:15 Bug山Bug海 阅读(368) 评论(0) 推荐(0)