silverlight-4.0

Server side exception handling in silverlight

天涯浪子 提交于 2019-12-11 08:38:58
问题 I am using WCF REST Service for my silverlight application. When I throw a webfault exception with error code 500. The silver light displays the error message:'Error:404 File not found'. I did some research and found that it is the problem with browser i.e. the browser stack can only pass two response codes, 200 and 404 to any plugin here in my case its silverlight. That means when ever there is a webfault exception at the server side the SL will only display the message 'File not found'. I

Custom property in RIA service not available on client

*爱你&永不变心* 提交于 2019-12-11 08:35:57
问题 I have an entity called StatusUpdates . There is no self join in it. However i want to include a list of InternalStatusUpdates which is of type StatusUpdates (Again i would mention there is no self join in database). So i created a partial class in the same namespace and created a property named InternalStatusUpdates and included [DataMember] attribute on it. But it still doesn't appear on the client. This is my partial class to be specific :- using System; using System.Collections.Generic;

C# class library, Silverlight class library , asmx web services WTH

久未见 提交于 2019-12-11 07:57:50
问题 ASMX services do not have ability to reuse the Silverlight Class library and Silverlight application needs dedicated Class library and not the C# class library. So i had to duplicate the C# class library code to a Silverlight class library to work with my Silverlight application, now that was not the problem here. I would like technical answers(In depth if possible) to these questions Why is it that Silverlight needs dedicated Silverlight Class library. Even though it runs above a layer on

SL 4: Monitor properties of ScrollViewer?

ぐ巨炮叔叔 提交于 2019-12-11 07:51:38
问题 We have a Canvas contained in a ScrollViewer. Users can add an unlimited number of UserControls that, to oversimplify, are a RichTextControl surrounded by a number of decorative rectangles. We have an arranger that positions all the UserControls so none overlap. When the arranger runs, it calculates a new position for each UserControl and sets its X and Y on the Canvas. Something is causing the ScrollViewer to scroll, however, so that after the arranger runs the user might have a different

Problem with Prism RegionManager and Unity container

别等时光非礼了梦想. 提交于 2019-12-11 07:51:26
问题 I have a main Silverilght project and other modules and I'm using Prism to glue them together along with Unity for Dependency Injection. I have one of my modules that depends on an IRegionManager which, naturally, gets injected to it by Unity. The issue I'm running to is that, the Regions property of the RegionManager that I get doesn't contain any regions even though I have declared two of them in my Shell as follows: regions:RegionManager.RegionName="MainRegion" I can't figure out the

Proper way to expose third party visual control in MEF

回眸只為那壹抹淺笑 提交于 2019-12-11 07:42:05
问题 What is the proper way to do that? Let's say we have some third party library in our project and we need to provide an access to some controls which are sealed. New widgets will be created and added to the application using MEF and they should be able to import some controls from the core application. So how to export those controls properly? 回答1: If you cannot modify the original class (e.g. ThirdPartyComponent ), then you can do the export via a property on another class (e.g.

How to clone Silverlight visual tree structure

六月ゝ 毕业季﹏ 提交于 2019-12-11 07:32:30
问题 I have the same problem as the question stated in "Printing in Silverlight 4". To get around the problem, I have tried to scale transform root of my visual tree before printing. void document_PrintPage(object sender, PrintPageEventArgs e) { var renderScale = 1.0D; if (LayoutRoot.ActualWidth > e.PrintableArea.Width) renderScale = e.PrintableArea.Width/LayoutRoot.ActualWidth; var scaleTransform = new ScaleTransform(); scaleTransform.ScaleX *= renderScale; scaleTransform.ScaleY *= renderScale; e

How to load specific xaml file from a xap file?

不问归期 提交于 2019-12-11 07:30:00
问题 I have the following page that references my silverlight application file. This works fine. I was wondering if, instead, I could point to a specific xaml file that is in the .xap file? Perhaps something like /ClientBin/test.xap?File=SomeXaml.xaml ? <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="test.Web.WebForm1" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http:

Selection changed event of ComboBoxEditSettings in a Devexpress gridcontrol(Silverlight)

谁都会走 提交于 2019-12-11 07:28:07
问题 I am doin silverlight 4 App. I have devexpress gridcontrol of 5 columns where i have placed ComboBoxEditor in a column . <dxg:GridControl x:Name="grid_currentillnes"> <dxg:GridControl.Columns> <dxg:GridColumn FieldName="Complaints" Header="Complaints/Disease" /> <dxg:GridColumn FieldName="Duration" Header="Duratiion" /> <dxg:GridColumn FieldName="Period" Header="Period" /> <dxg:GridColumn Header="Treatment" FieldName="Treatment"> <dxg:GridColumn.EditSettings> <dxe:ComboBoxEditSettings x:Name=

Consume WCF library in Silverlight 4 application

给你一囗甜甜゛ 提交于 2019-12-11 07:19:28
问题 An error occurred while trying to make a request to URI: 'http://localhost:8732/Design_Time_Addresses/WCF/Service1/'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in