CanOz Blog

Neil Knobbe's Blog at vbCity

vbCity Blogs moved to:
http://cs.vbcity.com/blogs
  Home :: Syndication  :: Login

OctNovember 2009Dec
SMTWTFS
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345

Archives

Image Galleries

vbCity Blogs

I got caught the other day with a "what the heck" moment.

I was trying to display "Mr & Mrs" as an Item in a ComboBox but it just was not happening.

I suppose that this would not have come to light if my computer was not slowing down when I opened the ItemCollection window in Visual Studio.  It was so slow that I would type something then have to wait for a couple of seconds to show what I had typed.  If I made a mistake I had to change it which would take more time, so I decided to just add the five combobox items in the XMAL itself.

As soon as I typed the item in, I got the squiggly blue line and the following error.

 

 

Which really threw me. 

Being an old HTML boy from years past it finally hit me.  XAML is a markup language and most, if not all, markup languages use the ampersand (&) for defining special characters and XML (which XAML is based on) is no different.

XAML has the same character entities as XML and one of these is for using the ampersand in markup.

Having refreshed my memory getting the desired result was an easy fix.

 

Which, when run, shows correctly in the ComboBox.

 

 

 

posted on Saturday, October 25, 2008 10:11 PM

Feedback

No comments posted yet.

Post Feedback

Title:
Name:
Url:
Comments: 
Protected by Clearscreen.SharpHIPEnter the code you see: