silverlight

silverlight webservice wont work on host

I have a silverlight 3 app that works fine accessing a DB on a host server on my PC. Now when I deploy the app on the host website, here is where the fun starts. It doesnt work and I cant locate the webservice service1 even though it exists. I dont know what to add to make this work because I have been told to change webconfig file, web...

What shall we do to get C# Silverlight Tcp Packet in one piece?

When we send a large amount of data to the client,its ReceiveAsync event is being called more than one time and in each time we get a few piece of the packet. What shall we do to get C# Silverlight Tcp Packet in one piece and through one event? Thank you in advance. ...

How to keep a nested grid square without using ViewBox?

This is similar to how-do-i-keep-aspect-ratio-on-scalable-scrollable-content-in-wpf, with the following differences: I'd like to avoid side-effects of the ViewBox - while the grid should resize when the container resizes, some of the grid content should keep their sizes (buttons for example). I don't need aspect ratios other than 1:1 (...

Making a silverlight UserControl fill the space available within content control

I have various user controls that get placed in a content control within my Silverlight App. At present I am hard coding the width and height of the controls to fill as they don't stretch. I have set the HorizontalAlignment and VerticalAlignment to strecth (on the usercontrol and DataTemplate), but they still don't fill the space availab...

Merge Assemblies in Silverlight

Hi, I'm trying to create a custom Control using a silverlight Class Library that inherits from an 3rd party control(like telerik radcontrols), and when I add my class library dll to another project, and try to use my custom Control an error occurs telling that the reference for the reference where the class that inherits with my contr...

Application configuration in Silverlight.

Hi there, I need to have some application settings in my Silverlight project. In a standard .NET project it is accomplished by adding some Settings file. However it is not supported in SL. What should be done then? I think of some xml configuration file, but where should it be placed and how should it be accessed? What is the most eleg...

DataGrid vertical scrollbar problems after resizing

Hi I'm working with a DataGrid in Silverlight. If I have enough items so that the vertical scrollbar is visible for all sizes of the window, and I resize the window a few times, the vertical scroll gets out of sync. The thumb gets to small as if the control thinks that there are more items then it is. When I drag the thumb towards the b...

Overlay two images using WriteableBitmap.

Hi there, I have got two images, say png and jpeg and I need to overlay them. In WPF it can be done by DrawingGroup (unavailable in SL). I guess it might be done with WriteableBitmap instead. Do you have any idea how to do that? Thanks in advance! Cheers ...

xClassNotDerivedFromElement error when adding Code Behind to Resource Dictionary in silverlight

I need to add code behind class to Resource Dictionary as described in this question. (I know that this is not a good practise but it should work based on the comments for linked question) .I'm referencing the code with x:Class attribute: XAML (separate Resource Dictionary file): <ResourceDictionary xmlns="http://schemas.microsoft....

Setting a Silverlight App to be WindowLess

I have downloaded the ComponentOne Silverlight controls, and am trying to add the HTMLHost control to one of my UserControls. When I run the App, I get the message To use this control the silverlight plugin must have its 'windowless' Property set to true Does anyone know how I set this property? ...

Silverlight binding to an object contained in a list

I am trying with difficulty to use binding on an object which is contained in a list, so for example: Class A { IList<Class B> Items; } Class B { string name; } I want to have in xaml for example <Textblock Text="{Binding ClassA.Items[5].name}"/> So any ideas? much appreciated ...

Alternative to System.Drawing.Bitmap in Silverlight which is compatible with WPF

I'm trying to cross compile some libraries for WPF and Silverlight. Currently one of the libraries depends on System.Drawing.Bitmap which is not available in Silverlight. It's a class that represents a device specific image format, and holds a reference to a Bitmap instance in order to display this image in a WPF application. What coul...

How to insert an associated entity in WCF RIA?

I've a class like this class MainClass { AssociatedClass b; } It's in a Silverlight RIA solution and the DomainService is LinqToEntitiesDomainService. I've an instance of AssociatedClass called AC and its already in the DB. Now say I want to create an instance of MainClass on client like this MainClass MC = new MainClass(); domain...

Using XAML and Silverlight 4, is there a way to build up a dynamic GRID rows and columns from databinding?

I'm trying to have a regular grid rows and columns defined dynamically using databinding in XAML only. I know I can use code behind for this but I'm looking for a way to do it purely in XAML. Any thoughts? ...

Multiple Resource Dictionaries

Hey all, quick question about Silverlight Resource Dictionaries. So in resource dictionary number 1, I have a data template. That data template contains a hyperlink button. My hyperlink button style is defined in resource dictionary number 2. Could someone explain how I have to set up my dictionary references and merges and all that st...

Silverlight AccentColor Theme Issues

I am trying to build a Business Application using the AccentColor Theme by copy/pasting the styles into the asset folder and adding the Merged Dictionaries in the app.xaml. After getting everything in place, per the instructions, I get 100+ errors about controls that do not exist like the buttonspinner. I currently have the Silverlight 4...

Silverlight 4 Equivalent to WPF "x:static"

I'm working on a project that is based on an old project someone started and didn't finish. I was trying to use as much of their code as I could, so in doing so I ran into some tweaking issues. Namely, when I put some of the old xaml in the new project there were some errors that were thrown regarding the "x:static" property and "Dyna...

Modify Silverlight Resource in VisualState

I am wondering if there is an easy way to modify some kind of shared resource (i.e. a Brush) of a control between different VisualStates. For example, I would like to define a Brush to use as both the Background of a Border and the Fill of a different Rectangle. In a different VisualState I would like to change this background Brush in o...

Using Silverlight RIA Services DomainDataSource to query by user

So I am using the SL4 Business Template and the SQL Membership API. I created a user and I created a custom table that ties to that user. So I want to have a datagrid that show the item for the CURRENT (WebContext.Current.User) user. Why is the GUID for the user in WebContext.Current.User??? I need that to join to the 'Items' table. H...

PlatformNotSupportedException when saving a file from Silverlight through a Generic Handler

I have a Silverlight application hosted in an ASP.NET site, through which I'm starting an HttpWebRequest to a Generic Handler in order to save a CSV file to the user's machine. From the Silverlight app, a Uri is constructed with parameters to make the CSV file server-side. A button is clicked which triggers the following: string http...