Silverlight (and WPF) Hosting: How to make items stretch horizontally in a ListBox

Sometimes we need to use controls like TextBox, TextBlock etc (that set their width automatically depending on content) in a ListBox’s ItemTemplate. If we need to draw Borders or assign Background colors to each such controls then we may end up having non-equal rows. Here’s a sample markup:

Here’s the output for the above XAML:

A quick thought . . . → Read More: Silverlight (and WPF) Hosting: How to make items stretch horizontally in a ListBox

WCF RIA Services Hosting :: Introduction to WCF RIA Services

. . . → Read More: WCF RIA Services Hosting :: Introduction to WCF RIA Services

Silverlight 4 Hosting :: The Advantage Using Silverlight 4 in the the ArcGIS Silverlight

Namespace prefixes

In Silverlight 3.0 you had to use multiple namespace prefixes to access classes in XAML that were located in different namespaces. This meant you often ended up with something like this in the page header:

xmlns:esri=”clr-namespace:ESRI.ArcGIS.Client;assembly=ESRI.ArcGIS.Client”
xmlns:esriSymbols=”clr-namespace:ESRI.ArcGIS.Client.Symbols;assembly=ESRI.ArcGIS.Client”
xmlns:esriGeometry=”clr-namespace:ESRI.ArcGIS.Client.Geometry;assembly=ESRI.ArcGIS.Client”
xmlns:esriToolkit=”clr-namespace:ESRI.ArcGIS.Client.Toolkit;assembly=ESRI.ArcGIS.Client.Toolkit”

In Silverlight 4 we can now map multiple namespaces to the same xmlns prefix, and the 2.0 API takes full advantage . . . → Read More: Silverlight 4 Hosting :: The Advantage Using Silverlight 4 in the the ArcGIS Silverlight

Silverlight 4 Hosting :: How to Solve Error Message – “Unable to start Debugging.The SilverLight Developer Runtime Not Installed. Please Install a matching version”

. . . → Read More: Silverlight 4 Hosting :: How to Solve Error Message – “Unable to start Debugging.The SilverLight Developer Runtime Not Installed. Please Install a matching version”

Silverlight 4 Hosting :: ViewBox Control in Silverlight

Adding Silverlight Toolkit Reference

Before you can use a ViewBox control, you must download the Silverlight Toolkit. After that you need to add a reference to the assembly.

To add a reference, right click the References folder of your project in Solution Explorer and select Add Reference. This action will open the Add Reference dialog as you can . . . → Read More: Silverlight 4 Hosting :: ViewBox Control in Silverlight

Sponsors

JaringanHosting.com

Cheap Reseller Hosting

Best Blog Hosting Provider

Best European ASP.NET 4.0 Hosting Provider