|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
warning in XAMLI am compiling and using one of the many samples that come with Vista SDK; it is called "DataTrigger". It works fine, but in the XAML pane I get a warning that makes me uneasy since I don't know why it occurs and if it is important (if it isn't, I guess it would not show a warning). This is part of the code: -------------------------------------------- <Window.Resources> <c:Places x:Key="PlacesData"/> -------------------------------------------- the warning is: -------------------------------------------- Warning 1 The element 'Window.Resources' in namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation' has invalid child element 'Places' in namespace 'clr-namespace:SDKSample;assembly='. List of possible elements expected: 'ResourceDictionary.MergedDictionaries, ResourceDictionary.Source, ResourceDictionary.IsReadOnly, ResourceDictionary.Keys, ResourceDictionary.Values, sgObject, sgValueType, Point, Size, Vector, Rect, Matrix, Int32Rect, Duration, FontStyle, FontStretch, FontWeight, KeyTime, RepeatBehavior, Color, PixelFormat, Matrix3D, Point3D, Point4D, Quaternion, Rect3D, Size3D, Vector3D, CornerRadius, FigureLength, GridLength, Thickness, DependencyProperty, sgDispatcherObject, sgDependencyObject, sgFreezable, sgAnimatable, TextDecoration, TextDecorationCollection, sgTimeline, sgAnimationTimeline, sgDoubleAnimationBase, DoubleAnimationUsingPath, DoubleAnimation, DoubleAnimationUsingKeyFrames, sgBooleanAnimationBase, BooleanAnimationUsingKeyFrames, sgByteAnimationBase, ByteAnimation, ByteAnimationUsingKeyFrames, sgCharAnimationBase, CharAnimationUsingKeyFrames, sgColorAnimationBase, ColorAnimation, ColorAnimationUsingKeyFrames, sgDecimalAnimationBase, DecimalAnimation, DecimalAnimationUsingKeyFrames, sgInt16AnimationBase, .... C:\Program Files\Microsoft SDKs\Windows\v6.0\Samples\WPFSamples\ConnectedData\DataTrigger\CSharp\Window1.xaml 11 -- Thanks in advance, Juan Dent, M.Sc. Hi,
Juan Dent wrote: > Hi, The XAML editor is still in quite an early stage. It is not able to > > I am compiling and using one of the many samples that come with Vista SDK; > it is called "DataTrigger". > > It works fine, but in the XAML pane I get a warning that makes me uneasy > since I don't know why it occurs and if it is important (if it isn't, I guess > it would not show a warning). recognize self-defined types (for example, you will not have intellisense on these types). If the application works fine, you may safely ignore the warning. The next version of Visual Studio (Orcas, available as CTP) will fix this. HTH, Laurent Show quote > > This is part of the code: > -------------------------------------------- > <Window.Resources> > <c:Places x:Key="PlacesData"/> > -------------------------------------------- > the warning is: > -------------------------------------------- > > Warning 1 The element 'Window.Resources' in namespace > 'http://schemas.microsoft.com/winfx/2006/xaml/presentation' has invalid child > element 'Places' in namespace 'clr-namespace:SDKSample;assembly='. List of > possible elements expected: 'ResourceDictionary.MergedDictionaries, > ResourceDictionary.Source, ResourceDictionary.IsReadOnly, > ResourceDictionary.Keys, ResourceDictionary.Values, sgObject, sgValueType, > Point, Size, Vector, Rect, Matrix, Int32Rect, Duration, FontStyle, > FontStretch, FontWeight, KeyTime, RepeatBehavior, Color, PixelFormat, > Matrix3D, Point3D, Point4D, Quaternion, Rect3D, Size3D, Vector3D, > CornerRadius, FigureLength, GridLength, Thickness, DependencyProperty, > sgDispatcherObject, sgDependencyObject, sgFreezable, sgAnimatable, > TextDecoration, TextDecorationCollection, sgTimeline, sgAnimationTimeline, > sgDoubleAnimationBase, DoubleAnimationUsingPath, DoubleAnimation, > DoubleAnimationUsingKeyFrames, sgBooleanAnimationBase, > BooleanAnimationUsingKeyFrames, sgByteAnimationBase, ByteAnimation, > ByteAnimationUsingKeyFrames, sgCharAnimationBase, > CharAnimationUsingKeyFrames, sgColorAnimationBase, ColorAnimation, > ColorAnimationUsingKeyFrames, sgDecimalAnimationBase, DecimalAnimation, > DecimalAnimationUsingKeyFrames, sgInt16AnimationBase, .... C:\Program > Files\Microsoft > SDKs\Windows\v6.0\Samples\WPFSamples\ConnectedData\DataTrigger\CSharp\Window1.xaml 11 > > > -- Laurent Bugnion [MVP ASP.NET] Software engineering, Blog: http://www.galasoft-LB.ch PhotoAlbum: http://www.galasoft-LB.ch/pictures Support children in Calcutta: http://www.calcutta-espoir.ch HelloJuan,
From your description, you're wondering whether the following warning is serious to your WPF application: >>>>>>>>> Warning 1 The element 'Window.Resources' in namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation' has invalid child element 'Places' in namespace 'clr-namespace:SDKSample;assembly='. List of possible elements expected: 'ResourceDictionary.MergedDictionaries, <<<<<<<<<< According to the WPF xaml snippet you provided -------------------------------------------- <Window.Resources> <c:Places x:Key="PlacesData"/> -------------------------------------------- the "Places" is your custom data class, correct? If so, I think the warning is expected and you do not to worry about it. It is caused by the XAML schema validation of the VS 2005 .NET 3.0 extension. Currently, the schema for validating XAML content only contains those built-in information, if register any custom class/control and add elements of those custom types in XAML(inside some built-in elements such as Window, button....), it will report validating warning as you've got. Actually, such issue is very common for those template based application such as ASP.NET(in which the aspx tempalte will be validated against certain xmlschema), and whenever you add some custom webcontrol into aspx template),since the original built-in ASP.NET control schema hasn't been updated, IDE will raise some design-time validation error/warning. Sincerely, Steven Cheng Microsoft MSDN Online Support Lead Sincerely, Steven Cheng Microsoft MSDN Online Support Lead ================================================== Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif ications. Note: The MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 1 business day is acceptable. Please note that each follow up response may take approximately 2 business days as the support professional working with you may need further investigation to reach the most efficient resolution. The offering is not appropriate for situations that require urgent, real-time or phone-based interactions or complex project analysis and dump analysis issues. Issues of this nature are best handled working with a dedicated Microsoft Support Engineer by contacting Microsoft Customer Support Services (CSS) at http://msdn.microsoft.com/subscriptions/support/default.aspx. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. |
|||||||||||||||||||||||