silverlight

How can I improve our .NET productivity?

I lead a team of six developers, and over the last year we've migrated over to a Silverlight/WCF/C#/EF/SQL Server architecture for our development. We've now deployed 5 or 6 small apps using this architecture, and we are currently working on a larger system. We've developed our own little solutions framework which we use as a template f...

How to calculate the optimum chunk size for uploading large files

Is there such a thing as an optimum chunk size for processing large files? I have an upload service (WCF) which is used to accept file uploads ranging from several hundred megabytes. I've experimented with 4KB, 8KB through to 1MB chunk sizes. Bigger chunk sizes is good for performance (faster processing) but it comes at the cost of me...

How can I connect to a TCP server using Silverlight?

I'm learning silverlight programming as well as networking and I was using this tutorial: http://www.switchonthecode.com/tutorials/csharp-tutorial-simple-threaded-tcp-server However in it it says to connect to a server you must create an instance of TcpClient, in my server side code which uses the forms application I have access to TcpC...

silverlight 4, dynamically loading xap modules

I know that it is possible to load xap modules dynamically using Prism or MEF framework. However, I'd like not to use those frameworks; instead load my xap files manually. So, I created the following class (adapted from internet): public class XapLoader { public event XapLoadedEventHandler Completed; private string _xapName; ...

What is the difference between Property and Dependency Property

Dependency properties are created the same way as properties. Is a dependency property used only while creating a custom control? ...

Silverlight performance design tips

What's your top 3 Silverlight performance design tips? Thanks ...

How do I use protobuf-net in Silverlight WCF generated service

I try to use protobuf-net in WCF/Silverlight application to improve large objects array serialization performance. I can serialize/deserialize classes (added Order=, etc) in the service code. But when I try to apply ProtoBehavior, and call the protobuf-enabled service method from Silverlight, I get nulls instead of data (or errors). I ...

LinQ to collection a basic question.

This may be too simple.Please help. List<Line> listLines = new List<Line>(); foreach (Point p in currentPointsLines) { Line l = new Line(); l.Tag = p; l.X1 = AnotherList[(int)p.X].CenterX; //AnotherList is of type Rectangle l.Y1 = AnotherList[(int)p.X].CenterY; l.X...

Serving Up Word Document From SIlverlight

I have a silverlight app. I want it to serve up a word document through it. The document will not exist anywhere physically, but will be coming into my silverlight app via a webservice call. Is this possible? ...

UIElement in layered fashion

Technology : Silverlight Platform : Windows Phone 7 foreach(Rectangle rec in listrect) { Layoutroot.Children.Add(rec); } Done some mouse move capture events and made these rectangles draggable. Each child element is added to the layout in some layered fashion I guess,where the first rectangle goes to the bottom layer next on top of th...

If WPF died, would anybody notice?

I just came across Tim Anderson's latest blog entry about MS' future regarding HTML5, Silverlight, WPF, and wonder, where is this all going. My personal experience is that I have never seen a WPF application, got a project enquiry re WPF only once, and have no idea where SL is actually used. To avoid the risk of having this question cl...

What do 2 brackets in a row mean in xaml.cs ?

Just started learning C# (in xaml), so appreciate some elaboration: ((MSAvalon.Windows.Serialization.ILoaded)(_Text_2_)).DeferLoad(); Not sure what all the round brackets means... does it mean "_Text_2_" is a child of object "MSAvalon.Windows.Serialization.ILoaded" ? and if so... why not just something like: MSAvalon.Windows.Seriali...

Need a simple Example of cascading combo boxes using MVVM

Need a simple Example of cascading combo boxes using MVVM Wpf / Silverlight ...

Silverlight, "The type or namespace name 'CookieContainer' does not exist in the namespace 'System.Net'"

I'm running VS2010 pro, and I downloaded a sample Silverlight app (found here: http://tinyurl.com/26brhfx) written in an older version. I did the conversion but now when I go to run it, I get this error. I searched the net, the only recommendation I found was to add a reference to "System.Net" (which didn't make sense, but I did anyway...

Silverlight and DataGridColumn type

Hi All, I have a datagrid with DataGridTemplateColumn and DataGridTextColumn in it. In my backend code I'm looping thru the datagrid.Columns Collections to see if the column has a binding or not. I need to know How can I determine if the Columns type is of DataGridBoundColumn or NOT?? Any ideas which method/property does that. ...

How to dynamically discover all XAML files in all modules in a Silverlight prism app.

Is there an easy way to dynamically discover all the XAMLs files within all the currently loaded modules (specifically of a Silverlight Prism application)? I am sure this is possible, but not sure where to start. This has to occur on the Silverlight client: We could of course parse the projects on the dev machine, but that would reduce ...

Why does silverlight run into an endless loop when printing document longer than 1 page? .HasMorePages = true

Hi. My 1st question here on stackoverflow. I am trying to print a long grid, which was dynamically generated. pdoc.PrintPage += (p, args) => { args.PageVisual = myGrid; args.HasMorePages = false; }; When I use args.HasMorePages = false;, it prints the first page of the grid as it should (althoug...

How to make my Silverlight application get displayed after I loaded the data?

Hi everyone! I have a SL application that reads some data from the database, which I do through a WCF Service. I was having some delay problems due to this access, so I solved it by loading all the data into a dictionary in my app. Now I want to make sure the application will only be displayed after I loaded all this information, how can...

Silverlight template selector solution works great, but not blend able.

Before I begin here is a reference to how I implemented a template selector with Silverlight. http://geekswithblogs.net/tkokke/archive/2009/09/28/datatemplateselector-in-silverlight.aspx Everything works great. But the solution just doesn't work in blends making things more difficult to visualize overall. Is the correct work flow to ...

Change Zindex via xaml

Is it possible to update the zindex property of an element via a trigger in the xaml? I thought something like below would work, but it's not: <i:EventTrigger EventName="MouseEnter"> <ei:ChangePropertyAction TargetObject="{Binding ElementName=Grid}" PropertyName="Canvas.ZIndex" Value="999"/> </i:EventTrigger> thanks, voss. ...