silverlight

How to combine .NET RIA Services with MVVM in Silverlight 3?

落爺英雄遲暮 提交于 2020-01-01 18:09:11
问题 The .NET RIA Services are described as an n-tier framework for Silverlight. I have been wondering what the relation is between this framework and the Model-View-ViewModel pattern. Are they in conflict or can you see the potential for synergic combination? 回答1: .NET RIA Services and MVVM are synergistic, and aren't in conflict. For example, if I write a Catalog domain service that exposes Products and Categories on the server, and correspondingly have a Catalog domain context on the client...

Silverlight custom Tabcontrol Design

南楼画角 提交于 2020-01-01 16:06:55
问题 I am Newbie to development and am going to develop a Windows-based project using Silverlight. I chose to make an OOB app (silerlight Out Of Browser application). In my project I am going to use a TabControl. I am able to display a TabControl with the help of MSDN document and have Dynamically added TabItems in TabControl. My problem is in my TabControl only one TabItem should be fixed like Google chrome Plus button but couldn't find any tutorials or documentation for this. If I found anything

Silverlight - Binding IsEnabled property on a button to a property on the ViewModel

流过昼夜 提交于 2020-01-01 15:37:46
问题 I'm building a Silverlight app and I would like to disable a button while a long running operation is going on in the background. I'm using MVVM, so in the ViewModel I have a property called SearchInProgress. Now I would like to disable the search button whenever SearchInProgress in true. In WPF I would simply write a DataTrigger which sets IsEnabled on the search button to false. Sadly DataTriggers are not available in Silverlight, so I'm looking for another solution. I've tried toying

初识Silverlight 4及其架构

风流意气都作罢 提交于 2020-01-01 13:16:02
简介 才开始学Silverlight 4。本文将谈到对Silverlight 4最初步的认识,同时将从多个角度谈一些与Silverlight 4架构有关的认识。 Silverlight 4是今年早些时候发布的。这项技术为我们带来了许多革新。它不仅是为用户带来了丰富的交互式的互联网和多媒体内容,还为我们提供了强大的轻量级的平台。我们可以在此平台上开发可移植的,跨平台的,基于网络的应用程序,并且可以从不同的源头集成服务和数据。相比传统Web应用的界面,Silverlight应用的界面让人耳目一新。让人感觉像是Windows Form应用程序搬到了Web上。 为什么需要Silverlight 4 前面我们在开发Web应用的时候,碰到了许多技术上的难题,如平台兼容,不同的文件格式和通讯协议,同样的页面在不同浏览器上的表现,还有不同浏览器对Javascript的解释,经常为这些问题加班熬夜,我们没有少费脑筋来试图解决这些令人头痛的问题。有了Silverlight技术: 我们就能克服现有技术平台的的不兼容性,不一致性。 我们就有了能力在多平台多种浏览器上创建一致的用户体验,不管在哪里,应用程序在外观上和行为上都是统一的。 我们就能利用熟悉的.net框架的类和功能将不同网络位置的数据和服务集成到一个应用程序中。 我们就能为用户提供一个多媒体的,表现丰富的,操作性强的用户界面。

那个我们爱的Silverlight

那年仲夏 提交于 2020-01-01 12:58:26
写这东西多少有点跟风的意思,不过最近的事还有大家的话多少让我回忆起一点对SL的旧感情。 离开微软的时候我巴巴地主动把手里写的SL控件(Menu/MenuItem)邮件给SL组的人,其实那时候都已经决定要走了,然后还给他们留了私人邮箱,说以后有问题还可以找我,虽然到现在也没看他们用上。所以说说实话我从内心深处是希望SL好的。 做为一个纯粹的技术人员,我看到的SL1.0是一个简单但是充满希望的产品,到了SL2我看到的就是一个曲意攀附.net的商业化妥协产物。 好吧,技术人员还是谈技术吧。不知道大家记不记得SL1.0里面的这个用法: item["ItemControl.source"]=//... 意思是ItemControl为其中的item附加了一个属性,当然因为JS的特性,ItemControl.source必须写成字符串的形式。提起这个是为了说,其实SL当年的志向并非一个UI framework或者浏览器插件那么简单,它是想做一个类似CLI的运行时。 Silverlight运行时最初设计的基础就是Dependency Object和Dependency Property(简称DO和DP),估计接触过Silverlight的弟兄们多少对这两个东西的存在应该是存疑的,估计也很少有人愿意去理解它们背后存在的道理。 其实相比JS用属性字符串名去访问属性,DO

Picking up Silverlight

╄→гoц情女王★ 提交于 2020-01-01 11:58:28
问题 I absolutely have no idea about Silverlight except that it is a Microsoft technology. Having nearly completed a Computer Science degree, having programmed in C# for a few years in a work environment - have a good knowledge of Java and OO techniques - how hard is the road of average Silverlight programming? I've been offered some work DAMN IT! I've mucked around with PHP, HTML and nearly no CSS.. Would I need a strong web programming background in order to pick it up? 回答1: I like Ben's answer,

Adding service references to multiple WCF services that shared classes

南笙酒味 提交于 2020-01-01 10:03:32
问题 I'm attempting to split up my WCF web services into a few services instead of 1 giant service. But the Visual Studio (Silverlight client) duplicates the common classes shared by both services. Here is a simple example to illustrate my problem. In this example there are two services. Both return the type "Person". By default VS will create two seperate Person proxy's under unique NameSpaces. This means that the "Person" returned by the different services cannot be consumed by the client as the

How to detect diconnected Duplex Polling clients

五迷三道 提交于 2020-01-01 10:01:48
问题 I have followed Tomek Janczuk's Pub/sub sample using HTTP polling duplex WCF channel but I've noticed that when a client disconnects by closing the browser the service does not notice on the next callback. I would have expected an exception or something to say that the endpoint was not there any longer. How can you know when a client is gone, so as to stop publishing to that client? 回答1: It seems there's one unsatisfactory, albeit simple solution: If the client callback times out, don't call

Silverlight 5 Backward Compatibility

对着背影说爱祢 提交于 2020-01-01 09:18:18
问题 I have a Silverlight application developed with version 4.0. I tried running it with Silverlight 5 client and everything seems to be fine up to now. But I am wondering; if my users installs Silverlight 5 for client, is it sure my application will still work well? Do I have to run all my Test Cases again? If anyone notices something that has been broke between versions, please list it here! :) Thanks 回答1: There's little evidence around the internet at the moment, other than that published by

How do I execute a foreach lambda expression on ObservableCollection<T>?

牧云@^-^@ 提交于 2020-01-01 09:10:09
问题 How do I execute a foreach lambda expression on ObservableCollection<T>? There is not method of foreach with ObservableCollection<T> although this method exists with List<T>. Is there any extension method available? 回答1: There is no method available by default in the BCL but it's straight forward to write an extension method which has the same behavior (argument checking omitted for brevity) public static void ForEach<T>(this IEnumerable<T> enumerable, Action<T> action) { foreach ( var cur in