Tooltips for indivual cells of a DataGrid

Just recently,  I have been faced with the question on how to add cell dependent tooltips to individual cells of a DataGrid in Silverlight. If you generate the columns by yourself, the task is straight forward by using the appropriate data template for the cell. Something like this:

               <TextBlock  Text="{Binding ColumnProperty}"
                    ToolTipService.ToolTip="{Binding ColumnProperty}"/>

However, if you let the columns be autogenerated by the grid, things are not so straight forward anymore. Tooltips for indivual cells of a DataGrid weiterlesen

WCF Services with Large Responds

If you happen to develop a WCF service that needs to deliver large amount of data to your Silverlight application, you might run into the problem that the data will never reach your application but instead you might just get an exception like „System.Net.WebException: The remote server returned an error: NotFound„.

There are two possible reasons for this:

  1. The transfer mode of your service being set to „Buffered“ and the size of the data being transferred is bigger than the buffer size.
  2. There are two many items to be serialized and deserialized by the DataContractSerializer.

WCF Services with Large Responds weiterlesen

Understanding WCF Services in Silverlight 2

NetFX Harmonics provides a in-depth and well written introduction on how to write and use WCF services in Silverlight applications:

In this document, I’m going to talk about how to access WCF services using Silverlight 2 without magic. There will be no proxies, no generated code, no 3rd party utilities, and no disgusting „Add Service Reference“ usage. Just raw WCF. This document will cover WCF connectivity in quite some depth. We will talk about service setup, various WCF, SOA, and Silverlight paradigms, client setup, some security issues, and a few supplemental features and techniques to help you aide and optimize service access. You will learn about various WCF attributes, some interfaces, and a bunch of internals. Though this document will be in depth, nothing will ever surpass the depth of MSDN. So, for a more full discussion on any topic, see the WCF documentation on MSDN.

Even though we’re focusing on Silverlight, most of what will be explained will be discussed in a .NET context and then applied to Silverlight 2. That is, instead of learning .NET WCF and Silverlight WCF, you will .NET WCF and how to vary this for Silverlight. This comparative learning method should help you both remember and understand the concepts better.

Read the full document here.

WPF Startup Performance

If you are developing a WPF application, you know about the increased startup time compared to native applications. One of the reasons is the time needed for loading the CLR the first time it is used after a reboot, but there are a lot more aspects affecting the time until your application window is shown on the screen and fully functional. Although .NET 3.5 SP1 improved the initialization time noticably, it is worth to understand the pitfalls and to design your application for fast startup and initialization. The following links will provide you some insights information: WPF Startup Performance weiterlesen

Packaging .NET assemblies

Recently, I stumpled upon Ralf Westphal’s post about packing of .NET assemblies for releasing (sorry, german only). The tool he describes is called Netz and really seems to be useful for having the possibility to break down separate functionality into specific assemblies at development time but not having to deliver a lot of separate assemblies for release.

I did not yet have the time to try Netz by myself. But it is good to know that such a tool exists and will try it out at the next opportunity.