Professional, Software

Warning in Tools about Custom Control

As many people on newsgroup have noticed that there is warning that shows up when you use a custom control in XAML.

Warning 1 The element ‘Canvas’ in namespace ‘′ has invalid child element ‘ListBox’ in namespace ‘clr-namespace:Silverlight.Samples.Controls;assembly=ClientBin/Silverlight.Samples.Controls.dll’. List of possible elements expected: ‘Code’ in namespace ‘’ as well as ‘Canvas.Clip, Canvas.RenderTransform, Canvas.Triggers, Canvas.OpacityMask, Canvas.Children, Canvas.Resources, Canvas.Background, Path, Ellipse, Line, Polygon, Polyline, Rectangle, Glyphs, TextBlock, Canvas, InkPresenter, MediaElement, Image’ in namespace ‘′. D:\Project\ImageListBox\ImageListBox\Page.xaml 15 4 ImageListBox

This is because Tools for Silverlight Alpha dont yet support custom controls. They do intellisense etc against the fixed schema of known platform elements. Since Custom controls are not known, tools think that it is invalid element to have a child for Canvas.

It is ok to ignore this warning though it is very irritating. I am sure there is a way to tweak the settings around errors and warning but I personally dont think it is worth doing it because it might mask some valid things.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s