silverlight-2.0

Silverlight WCF access returning an IList of LLBLGen entities?

Hi I'm having a problem passing an entity collection back from LLBLGen to silverlight. My contract looks like this. I don't even know if this is possible. My web service code looks like this: public IEnumerable<WaterWorksCustomersEntity> GetCustomer(long custId, string acctKey) { var toReturn = new WaterWorksCustomersEntity(custId...

Host SilverLight / WCF

Hi all I have created my first silverlight app :-) It has a basic page and connects to a db to populate a list. the connection is done using wcf, so my silverlight connects to a ServiceReference that does the stuff. This all works fine when i run from VisualStudio. My problem is that i am not sure how to host this app. I created an a...

Can row or column definitions autosize to the dimensions of their contents

So for example... in the following user control I have a grid with two rows. I want the bottom row to be the height of it's contents and the top row to be the height of the rest of the grid. I can set a absolute height as in the example, but that isn't particularly flexible. Say someone changes a font sizing the text could get clipped....

Dynamic Grid In Silverlight 2 using C#

I need to insert UIElements into a Grid that does not get generated until runtime. More specifically, I need to add UIElements to the RowDefinitions I create after I determine how many elements need to be displayed. Is there a way to contorl the Grid.Row and Grid.Column and Grid.RowSpan like in XAML for objects in C#? If I am going about...

Silverlight - Getting the Domain Information

How does a Silverlight application ask the browser what domain its being served up from? UPDATE: Make sure if your class doesn't already have this using statement add it at the top your class. This will help you on some of the examples you'll see online. It confused me for a bit. using System.Windows.Browser; ...

Silverlight - Default Gradient or Effect - How do you turn it off?

If you use this code in Silverlight and WPF you get slightly different results? <Button Name="SomeButton" Margin="10,15,180,12" Width="200" Height="50" VerticalAlignment="Top" Background="Black" Foreground="White"> </Button> In Silverlight you do not get a solid black Button. You get a vertical white-to-black grad...

Is silverlight a good choice for web applications which display large amounts of data and focus on user productivity?

I've played some on-line demos of silverlight component packs, like Telerik, NetAdvantage and ComponentOne and although I was very impressed by what I saw, I had also the impression that the demo applications were heavy to load, even during the usage of some components. I'm planning to try silverlight in a project that demands loading l...

Can Silverlight initiate Page Refreshes?

UPDATE: An alternative title for this could be: How do I call javascript from my silverlight 2.0 application. Here is a quick question for all you Silverlight gurus. I have a Silverlight app that displays a stopwatch countdown. The app is hosted in an ASP.Net web application, What I want it to do is when the stopwatch hits zero, the a...

Silverlight InitParams where value has a comma

In Silverlight 2, using C# on ASP.NET, you can pass a set of Initialization Parameters by assigning the Silverlight object's InitiParams with a string that's a series of comma separated key/value pairs. I've seen other systems that have a similar mechanism for passing around collections of key/value pairs as a single string. What is th...

Silverlight Grid Splitter Unexpected Behaviour

Hi, I am just starting out on Silverlight using version 2.0. I wanted to show a few data grids on the page and got this going OK by dropping each into a grid cell. I then thought I would try adding a grid splitter using the following markup: <UserControl xmlns:basics="clr-namespace:System.Windows.Controls;assembly=System.Windows.Contro...

Appending Silverlight Toolkit AutoCompleteBox with selected item

I'm working with an Autocomplete box from the Silverlight Tookit (December release). As the user types, I use a webservice to return an ItemsSource containing a lookup of only the word that the user is currently typing into the AutoCompleteBox (as oppossed to the entire phrase, which is the default behavior). What I'd now like to do is...

What are the security concerns when passing a hashed password around?

I have a Silverlight control on a web page and would like to pass the username and the hashed password to this control as part of the InitParams. What are the security concerns with doing this? The user has to log in to get to this page. However, I'm guessing that the browser might cache the page with the Silverlight control and this w...

What are the often misunderstood concepts in Silverlight?

Silverlight 2.0 has been out for a little while now. What are the concepts that you often see used incorrectly or think are misunderstood? ...

.net Runtime - Silverlight Runtime = ?

I've googled around a bit, and I haven't been able to find a good listing of what classes from the .net CLR are not included in the 'CoreCLR' aka Silverlight. What is Silverlight missing from the Windows .net Framework? Also, is there anything that the Silverlight runtime has that the .net Framework doesn't? ...

How do I detect waiting asynchronous wcf calls?

I make calls to a WCF service from my silverlight application. I am doing this asynchronously and I am not blocking execution after making the async. call (that means, I am not using wait-join mechanism frm this page). I do not want the flow to get blocked. However, I would like to detect that the WCF call has gone into a wait state so ...

Controlling rendering order (ZOrder) in Silverlight without using the Canvas control

I'm programmatically adding a UserControl to another in Silverlight 2 by adding it to the parent control's "Children" collection. At first this works fine. If I do something else to the window (in my case I'm scrolling the entire panel out of view then back into view) then it apparently changes the render order and causes my control to ...

Silverlight 2 Debugging Issues with Visual Studio 2008

I have problem to debug a simple Silverlight 2 application with Visual Studio 2008 SP 1. Sometimes, I could debug the Page.cs code and sometimes not. I have a web application, which hosts the silverlight .xap files. Deleting the .xap files from ClientBin Directory and rebuilding works sporadic but not reliable. I am frustrated. ...

Silverlight bound TextBox loses data when browser closes

When I bind a TextBox control to a string property of a object using two way binding, it works fine - as long as the user moves off the control before he closes the browser window/tab. But what about the user who makes a change to the contents of a text box then closes the window expecting the data to have been saved? While it is possi...

Silverlight - Launch in explorer without toolbar

Can anyone tell me how to take a silverlight app so that when I click on the link it starts the browser at a given size without toolbars. My java script skills are limited at the best of times, so any help would be appreciated! ;-) Thanks ...

easiest way to center an image in silverlight?

Say I have a grid with 3 rows. In the center row I'd like to put an image and then center it in that row vertically and horizontally. But since (I think) Silverlight uses upper left corners of an element when it centers, the upper left corner of the image is centered when I tell it to center vertically/horizontally. I've seen 2 approa...