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 ‘http://schemas.microsoft.com/client/2007′ 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 ‘http://schemas.microsoft.com/winfx/2006/xaml’ 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 ‘http://schemas.microsoft.com/client/2007′. 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.

Advertisements
Standard

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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