摘要:
1、如果你的WCF是建立在Silverlight创建时的WEB网站下面,在引用时,用的是在项目中自动找的,这样可能是有问题(我原来遇到过一样的情况)。你可以先将WCF部署到IIS中,然后在添加服务引用时输入WCF地址,找到WCF服务,应该就可以了!2、跨域问题,找一个clientaccesspolicy.xml文件复制到WCF服务所在目录下面和C:\inetpub\wwwroot(IIS的目录)下;找不到clientaccesspolicy.xml的话,自己建一个,内容如下: ... 阅读全文
摘要:
Point p = MyMap.MapToScreen(newPoint);Point changePoint = new Point(p.X + 20, p.Y);MapPoint mp = MyMap.ScreenToMap(changePoint);MyMap :地图插件 阅读全文
摘要:
App.Current.Host.Content.FullScreenChanged+= new xxxxx例子:App.Current.Host.Content.FullScreenChanged += FullScreenChanged; private void FullScreenChanged(object sender, EventArgs handler) { if (Application.Current.Host.Content.IsFullScreen) { TextBlock tb =... 阅读全文
摘要:
介绍Silverlight 2.0 人机交互:响应用户的鼠标操作和键盘操作MouseEnter - 鼠标进入时触发的事件(显然,此事件不能冒泡)MouseLeave - 鼠标离开时触发的事件(显然,此事件不能冒泡)MouseLeftButtonDown - 鼠标左键单击按下时触发的事件MouseLeftButtonUp - 鼠标左键单击按下并放开时触发的事件MouseMove - 鼠标移动时触发的事件MouseEventArgs.GetPosition() - 鼠标相对于指定元素的坐标MouseButtonEventArgs.Handled - 此事件是否已被处理KeyDown - 鼠标按下时 阅读全文
摘要:
alert($(window).height()); //浏览器当前窗口可视区域高度 alert($(document).height()); //浏览器当前窗口文档的高度 alert($(document.body).height());//浏览器当前窗口文档body的高度 alert($(document.body).outerHeight(true));//浏览器当前窗口文档body的总高度 包括border padding margin alert($(window).width()); //浏览器当前窗口可视区域宽度 alert($(document).width());//浏览器当 阅读全文
摘要:
常规的关系数据库访问 在Silverlight中,要实现对关系数据库的访问,主要是通过服务的方式,包括Web Service和WCF服务等,结合ADO.NET实体数据模型和LINQ to SQL等技术,以下是对这些技术路线的简要说明。2.1 Web Services原理:在服务器端(ASP.NET网站)通过 ADO.NET 编码实现数据的增删查改操作,将方法封装为 Web Service 发布;Silverlight 客户端添加 Web Service 引用,在代码中调用服务方法完成数据访问操作。优点:灵活、数据库兼容性好。缺点:代码量较大,开发效率低、安全性一般。2.2 WCF Data S 阅读全文
摘要:
Dictionary list=new Dictionary;//3.0以上版本foreach(var item in list){ Console.WriteLine(item.Key+item.Value);}//KeyValuePairforeach(KeyValuePair kv in list){ Console.WriteLine(kv.Key+kv.Value);}//通过键的集合取foreach(string key in list.Keys){ Console.WriteLine(key+list[key]);}//for循环遍历List test=new List(list 阅读全文
摘要:
今天在做项目时遇到了,采用QueryTask地图图层查询任务时,发现最大返回结果为500条的限制。 困扰整个下午之后,搜索到: 官网帮助:http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/arcgis/help/jshelp_start.htm#jshelp/intro_querytask.htm中有一段提到:“You should also consider that users can inadvertently or maliciously request unlimited numbers of featur 阅读全文
摘要:
(function ($) { $.fn.extable = function (options) { var $default = { evenStyle: "evenstyle", oddStyle: "oddstyle", activeStyle: "activestyle" }; var opts = $.extend({}, $.fn.extend(), $default); $(this).find("tr:even").addClass(opts.evenStyle); $(this).find(&q 阅读全文