<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.2" -->
<rss version="0.92">
<channel>
	<title>cmb-web.co.uk</title>
	<link>http://www.cmb-web.co.uk</link>
	<description></description>
	<lastBuildDate>Thu, 05 Aug 2010 20:17:37 +0000</lastBuildDate>
	<docs>http://backend.userland.com/rss092</docs>
	<language>en</language>
	
	<item>
		<title>Formatting text directly in XAML</title>
		<description>You can format text strings directly in the XAML code of a WPF application.

For example, you can use standard .NET formatting such as currency and date:

&#60;TextBlock Text="{Binding Amount, StringFormat={}{0:C}}"/&#62;
&#60;TextBlock Text="{Binding Date, StringFormat={}{0:dd/MM/yyyy}}"/&#62;

The empty {} after the StringFormat= escapes the text before the formatting string.

You can add text in front of ...</description>
		<link>http://www.cmb-web.co.uk/index.php/2010/08/formatting-text-directly-in-xaml/</link>
			</item>
	<item>
		<title>Unit testing internal methods</title>
		<description>When unit testing applications you write tests for the exposed public methods.  Philosophically this is correct as you need to test the functionality exposed by your class to the consuming application, and any private or internal functions that use functionality that also needs testing should be discrete from this class. ...</description>
		<link>http://www.cmb-web.co.uk/index.php/2010/08/unit-testing-internal-methods/</link>
			</item>
	<item>
		<title>Android numeric input</title>
		<description>To restrict the input for an EditText to a numeric value, you can add the following to the layout file:

&#60;EditText
...
android:singleLine="true"
android:inputType="numberDecimal"
...
&#62;

Then use, for example, Double.parseDouble(...) to retrieve the value in code.

Incidentally, the documentation recommends avoiding floats and using double instead. </description>
		<link>http://www.cmb-web.co.uk/index.php/2010/07/android-numeric-input/</link>
			</item>
	<item>
		<title>main.out.xml: Error parsing XML: no element found</title>
		<description>When you build and run your Android application in Eclipse you can get the following error message:

...res\layout\main.out.xml:1: error: Error parsing XML: no element found

This occurs when you try and run the application from the main.xml layout file. The application cannot run from here and needs to be run from the ...</description>
		<link>http://www.cmb-web.co.uk/index.php/2010/04/mainoutxml-error-parsing-xml-no-element-found/</link>
			</item>
	<item>
		<title>Error registering WCF host in Windows Vista (HTTP could not register URL http://+:80)</title>
		<description>This is an error encountered by one of my team when trying to run up a WCF host on a Windows Vista machine.  The actual exception is an

AddressAccessDeniedException

with the error message

HTTP could not register URL http://+:80/. Your process does not have access rights to this namespace (see http://go.microsoft.com/fwlink/?LinkId=70353 for details)

The ...</description>
		<link>http://www.cmb-web.co.uk/index.php/2010/03/error-registering-wcf-host-in-windows-vista-http-could-not-register-url-http80/</link>
			</item>
	<item>
		<title>C# Image from a byte array (and back again)</title>
		<description>Quick code sample for transforming a .NET System.Drawing.Image into a byte array:

public byte[] imageToByteArray(Image imageIn)
{
    MemoryStream ms = new MemoryStream();
    imageIn.Save(ms,System.Drawing.Imaging.ImageFormat.Gif);
    return ms.ToArray();
}
and conversely, turning a byte array into an image:

public Image byteArrayToImage(byte[] byteArrayIn)
{
    MemoryStream ms = new MemoryStream(byteArrayIn);
    Image returnImage = Image.FromStream(ms);
    return returnImage;
}
 </description>
		<link>http://www.cmb-web.co.uk/index.php/2010/03/c-image-from-a-byte-array-and-back-again/</link>
			</item>
	<item>
		<title>Class not registered error in Windows 7 for ActiveX control</title>
		<description>I recently had cause to use an ActiveX control in a Windows Forms project.  I was actually building a WPF application, that required a specific control that was ActiveX based.  This is not a very pretty thing; I wrapped the control in a Windows Forms user control within a WPF User ...</description>
		<link>http://www.cmb-web.co.uk/index.php/2010/01/class-not-registered-error-in-windows-7-for-activex-control/</link>
			</item>
	<item>
		<title>ASP.NET MVC nested master pages</title>
		<description>Creating nested master pages in ASP.NET MVC is straight forward, but slightly different to that in normal ASP.NET.

First, delete the two code behind files. 

Second, you need to alter the page header to remove the references to the codefile and alter the inherits.

Change the standard file from:

&#60;%@ Master Language="C#" MasterPageFile="~/Views/Shared/Site.master" AutoEventWireup="true" ...</description>
		<link>http://www.cmb-web.co.uk/index.php/2010/01/aspnet-mvc-nested-master-pages/</link>
			</item>
	<item>
		<title>SQLCMD mode in SQL Server Management Studio</title>
		<description>In Microsoft SQL Server 2005, Microsoft introduced the command line tool sqlcmd to replace osql.

The SQL Server Management Studio allows you to run your scripts in 'sqlcmd mode' in the query window.  This allows you to take advantage of the syntax colour coding and variables, while developing and testing sqlcmd ...</description>
		<link>http://www.cmb-web.co.uk/index.php/2009/08/sqlcmd-mode-in-sql-server-management-studio/</link>
			</item>
	<item>
		<title>Executing multiple SQL statements with SqlCommand</title>
		<description>If you try and execute a number of sql statements in one go using the SqlCommand object, you will receive a SqlException: "Incorrect syntax near..." when you call the ExecuteNonQuery().

This is because the "GO" statements cannot be executed within the script. The simple way around this is to break the ...</description>
		<link>http://www.cmb-web.co.uk/index.php/2009/08/executing-multiple-sql-statements-with-sqlcommand/</link>
			</item>
</channel>
</rss>
