{"id":3147,"date":"2014-03-16T22:58:07","date_gmt":"2014-03-16T22:58:07","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/16\/silverlight-forumsprogramming-silverlight-with-net-general-related-issues-collection-of-common-programming-errors\/"},"modified":"2014-03-16T22:58:07","modified_gmt":"2014-03-16T22:58:07","slug":"silverlight-forumsprogramming-silverlight-with-net-general-related-issues-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/16\/silverlight-forumsprogramming-silverlight-with-net-general-related-issues-collection-of-common-programming-errors\/","title":{"rendered":"silverlight-forums,programming-silverlight-with-net-general-Related issues-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\nsilverlight-forums programming-silverlight-with-net-general-<br \/>\nInside my Silverlight app, I&#8217;m calling a web service asynchronously, using the client generated for me by Visual Studio (Add Service Reference&#8230;).\u00a0 My code looks like this:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0BasicHttpBinding binding = new BasicHttpBinding();\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 EndpointAddress endpoint = new EndpointAddress(&#8220;http:\/\/localhost:8080\/fourdintent\/DataQuery2&#8221;);\u00a0\u00a0\u00a0\u00a0&amp;nbs<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\nsilverlight-forums programming-silverlight-with-net-general-<br \/>\nI&#8217;m serializing a class to xml on server-side, sending xml stream to silverlight client, then deserialize it on client side. The problem I have is I have to make two same data contract class, both on server-side and client-side. Is it possible to write aclass library which you can include in both silverlight and ASP.NET server project?[DataContract(Name = &#8220;ImageDTO&#8221;, Namespace = &#8220;http:\/\/localhost&#8221;)] public class ImageDTO{\u00a0\u00a0\u00a0 [DataMember()]\u00a0\u00a0\u00a0 pub<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\nsilverlight-forums programming-silverlight-with-net-general-<br \/>\nI am in jepardy of losing the fight to move from winforms to silverlight because I can&#8217;t get our class library to work with WCF.\u00a0 I am trying to use a class library that implements INotifyDataChanged to bubble changes up through nested objects. Nothing special,lower objects use the PropertyChanged event to set a dirty flag and then bubble that change up to higher level classes. Works dandy in winforms but now that we are trying to use WCF and Silverlight the whole thing is blowing up in my<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\nsilverlight-forums silverlight-4<br \/>\nDoes Silverlight support double click? For example,\u00a0when the user\u00a0doubleclicks on a text box, I need to capture the event and change the display and content\u00a0of an related datagrid.I am asking because I heard that &#8220;Silverlight does not support double click&#8221; but I think this general statement may imply some details.<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\nsilverlight-forums silverlight-4<br \/>\nI tried to get data from a restful service in SL app. Here is my testing code in SL app:public void getService(){\u00a0\u00a0 Uri serviceURI = new Uri(&#8220;http:\/\/Mysite\/Mywcservice\/myTest.json?Id1=10&amp;id2=2&#8221;);\u00a0\u00a0 WebClient proxy = new WebClient();\u00a0\u00a0 proxy.OpenReadCompleted = new penReadCompletedEventHandler(proxy_OpenReadCompleted);\u00a0\u00a0 proxy.OpenReadAsync(serviceURI);}void proxy_OpenReadCompleted(object sender, OpenReadCompletedEventArgs e){\u00a0\u00a0 var<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\nsilverlight-forums wcf-ria-services-with-silverlight<br \/>\nHi all!I&#8217;m converting a big business application to Ria Services and I&#8217;m struggling to make a simple screen to work like in a VB6 application but unfortunately this process is being too painfull &#8230;So let&#8217;s give some backgroung about the scenario of my application &#8230;My client has a huge business application that&#8217;s in VB6, it&#8217;s a typical 2 tier VB6 app, with a MDI window and tons of internal MDI child forms, some of then are modal others are not.In the vast majority of the forms the workflow is<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\nsilverlight-forums visual-studio-amp-silverlight-development-tools-<br \/>\nHi everyone! and really hope you&#8217;ll help me to solve this issue.The issue is the\u00a0ProtocolException error I&#8217;m getting when my Silverlight application calls the webservice. The service is .asmx and it&#8217;s working fine in any other applications except SL application.I have tried to fix it with different variations from the net, but still nothing helps :(&#8230; At first I have ran a WebDevelopment Helper and it showed me the first problem &#8211; it was Cross-Domain Issue and there were no files like clie<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\nsilverlight-forums silverlight-4<br \/>\nI use Blacklight expander in my Silverlight project and i want to create a Button to expand or collapse all the expander in the same time and change the Button content. The Blakclight control have the property &#8220;IsExpanded&#8221;. Is there a way to do that ?The Blacklight expander\u00a0is similar\u00a0to the\u00a0Silverlight Toolkit Accordion\u00a0control.Thank<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\nsilverlight-forums report-a-silverlight-bug-<br \/>\nIn Beta2,\u00a0When I\u00a0make a\u00a0moving animation\u00a0using\u00a0Storyboard, the object&#8217;s tranform value is changed directly.\u00a0But, Strangely\u00a0 In RC, the transform value is not changed. So I made some test. this is very simple code.Page.xaml&lt;UserControl x:Class=&#8221;StoryBoardTest.Page&#8221;\u00a0\u00a0\u00a0 xmlns=&#8221;http:\/\/schemas.microsoft.com\/winfx\/2006\/xaml\/presentation&#8221;\u00a0\u00a0\u00a0 xmlns:x=&#8221;http:\/\/schemas.microsoft.com\/winfx\/2006\/xaml&#8221;\u00a0\u00a0<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\nsilverlight-forums accessing-web-services-with-silverlight-<br \/>\nHi ya!\u00a0I don&#8217;t know if this is the right forum, so please forgive me if I am off-topic.I am developing a RIA Domain Service, which is also exposed with a Json endpoint:&lt;domainServices&gt;\u00a0\u00a0 \u00a0 \u00a0&lt;endpoints&gt;\u00a0\u00a0 \u00a0 \u00a0 \u00a0&lt;add name=&#8221;OData&#8221; type=&#8221;System.ServiceModel.DomainServices.Hosting.ODataEndpointFactory, System.ServiceModel.DomainServices.Hosting.OData, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35&#8243;<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\nsilverlight-forums programming-silverlight-with-net-general-<br \/>\nInside my Silverlight app, I&#8217;m calling a web service asynchronously, using the client generated for me by Visual Studio (Add Service Reference&#8230;).\u00a0 My code looks like this:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0BasicHttpBinding binding = new BasicHttpBinding();\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 EndpointAddress endpoint = new EndpointAddress(&#8220;http:\/\/localhost:8080\/fourdintent\/DataQuery2&#8221;);\u00a0\u00a0\u00a0\u00a0&amp;nbs<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\nsilverlight-forums programming-silverlight-with-net-general-<br \/>\nI&#8217;m serializing a class to xml on server-side, sending xml stream to silverlight client, then deserialize it on client side. The problem I have is I have to make two same data contract class, both on server-side and client-side. Is it possible to write aclass library which you can include in both silverlight and ASP.NET server project?[DataContract(Name = &#8220;ImageDTO&#8221;, Namespace = &#8220;http:\/\/localhost&#8221;)] public class ImageDTO{\u00a0\u00a0\u00a0 [DataMember()]\u00a0\u00a0\u00a0 pub<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\nsilverlight-forums programming-silverlight-with-net-general-<br \/>\nI am in jepardy of losing the fight to move from winforms to silverlight because I can&#8217;t get our class library to work with WCF.\u00a0 I am trying to use a class library that implements INotifyDataChanged to bubble changes up through nested objects. Nothing special,lower objects use the PropertyChanged event to set a dirty flag and then bubble that change up to higher level classes. Works dandy in winforms but now that we are trying to use WCF and Silverlight the whole thing is blowing up in my<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\nsilverlight-forums programming-silverlight-with-net-general-<br \/>\nI made a WCF web service in\u00a0one solution that will be deployed to a server and\u00a0used with muliple types of apps (WinForms, WPF, Silverlight, etc. ).\u00a0 Deployed and works fine with a WPF app in another solution.\u00a0 I created a third solution for a SL2 app, butdoes not work with the WCF service.\u00a0 I can find the service and add it to my references.\u00a0 I have the &#8230;Complete event Method setup correctly.\u00a0 When I call the &#8230;Async Method, I get an error.ProtocolException&amp;<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\nsilverlight-forums programming-silverlight-with-net-general-<br \/>\nHi guys,\u00a0I&#8217;m struggling with a 404 error. I have a web service that is running from VS2008, it has a public method that takes a few primative type variables and returns a boolean. I can manually browse to and execute the method from a web browser. I have added aclientaccesspolicy.xml to the project (see below for contents). I also have a Silverlight application that is running from a 2nd VS2008 environment. It is running from a web project (start page is http:\/\/localhost:port\/project\/file.a<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\nsilverlight-forums programming-silverlight-with-net-general-<br \/>\nThis does&#8217;nt seem that difficult, unfortunately I&#8217;m sitting here for the good part of a day and just can&#8217;t figure it out.I have a custom control exposing an IsActive boolean DP.I used Binding to bind this DP to the IsHitTestVisible property of a grid to disable its mouseover and mouseout and click events.Unfortunately I have to swap the boolean to make sense, true becomes false and false becomes true.Also very unfortunately I don&#8217;t get the Converter to work, it is located within the App.xaml.&lt;<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\nsilverlight-forums programming-silverlight-with-net-general-<br \/>\nI have a Silverlight Application which queries a WCF service (Basic HTTP Binding).The service is hosted in the web site which hosts the silverlight content too.I keep an exception in the EndInvoke-method in the service client wrapper class throws a ProtocolException:The remote server returned an unexpected response: (404) Not Found.here is the content of my clientaccesspolicy.xml file\u00a0 &lt;access-policy&gt;\u00a0 &lt;cross-domain-access&gt;\u00a0\u00a0\u00a0 &lt;policy&gt;\u00a0\u00a0\u00a0<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\nsilverlight-forums programming-silverlight-with-net-general-<br \/>\nWhen I try to change the address via rightClicking on the ServiceReference and choosing Configure Service Reference&#8230;\u00a0to either a Silverlight-enabled\u00a0Web Service(.svc) or a Web Service(.asmx) \u00a0fromhttp:\/\/localhost:49547\/sl2b2_webServiceTest2Web\/servSL2B2.svc\u00a0tohttp:\/\/localhost\/sl2b2_webServiceTest2Web\/servSL2B2.svc\u00a0I get an error saying &#8220;There was no endpoint listenting athttp:\/\/localhost\/sl2b2_webServiceTest2Web\/servSL2B2.svc that could accept the message&#8221;.Ho<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\nsilverlight-forums programming-silverlight-with-net-general-<br \/>\nHi. I&#8217;m using Silverlight 4. Trying to get to selectedItem returned when a user clicks a row on a Datagrid. I am using the SelectionChanged Event (VB) but its firing in all the wrong places. Double click not being present doesn&#8217;t help. I would be reallygrateful if anyone could point me in the right direction for a solution. Cheers Scott<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\nsilverlight-forums programming-silverlight-with-net-general-<br \/>\nHi! I have a problemI build client server application on silverlight\u00a0 2.0I implement webService project &#8211; ChatService and asp.net project Chat.Display projectI need to use in Chat.Display the webService\u00a0 ChatServiceHow can i add web reference to Chat.Display project?I can just Add Service Link not Add web Reference?Thanks\u00a0<\/li>\n<\/ul>\n<p>Web site is in building<\/p>\n","protected":false},"excerpt":{"rendered":"<p>msdn silverlight-forums programming-silverlight-with-net-general- Inside my Silverlight app, I&#8217;m calling a web service asynchronously, using the client generated for me by Visual Studio (Add Service Reference&#8230;).\u00a0 My code looks like this:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0BasicHttpBinding binding = new BasicHttpBinding();\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 EndpointAddress endpoint = new EndpointAddress(&#8220;http:\/\/localhost:8080\/fourdintent\/DataQuery2&#8221;);\u00a0\u00a0\u00a0\u00a0&amp;nbs msdn silverlight-forums programming-silverlight-with-net-general- I&#8217;m serializing a class to xml on server-side, sending xml stream to silverlight [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3147","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3147","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=3147"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3147\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=3147"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=3147"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=3147"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}