Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > Windows Presentation Foundation
|
Windows Presentation Foundation Discussion of the beta version of Windows Presentation Foundation "WPF" formerly know as codename "Avalon" as well as the related XAML.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Windows Presentation Foundation section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 23rd, 2007, 08:04 AM
Registered User
 
Join Date: May 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error in loading the serialized canvas object

Hi,



I'm getting an error while loading a serialized object of canvas.



I have a WPF window on which user can create UI objects at runtime by drag-drop operation.



I have a Canvas object created by drag-drop operation. This canvas has few child controls.

It is then serialized using XAMLWriter.Save method.



While deserializing the same canvas object, following error comes on XamlReader.Load() method.



"Cannot set Name attribute value <controlname> on element 'TextBlock'. 'TextBlock' is under the scope of element <Canvas>, which already had a name registered when it was defined in another scop"



While de-serializing the canvas, child control's "Name" property is not accepted by the XAMLParser.



 How should I serialize and deserialize canvas object such that it can be parsed without any error?



thanks





Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding Image on Canvas seikwon180 Pro Java 1 July 17th, 2013 02:09 AM
mysql is stripping slashes in serialized array harpua PHP Databases 1 December 5th, 2007 07:16 AM
converting .NET error object in VB error object webnet .NET Web Services 0 February 5th, 2007 06:02 AM
Object Factories with Lazy Loading in C# cyberjoe C# 2 December 13th, 2006 11:21 PM
storing serialized object in sql server ACE2084 General .NET 0 October 13th, 2005 01:35 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.