Hiearchy Issues
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 1 of 1

Thread: Hiearchy Issues

Hybrid View

  1. #1
    Join Date
    Oct 2010
    Posts
    1

    Hiearchy Issues

    Im in a class currently working on a project. The assignment is to design a game using wpf only, not XAML or XNA or any other useful, probably more suitable language to work with. Most of the refrences I can find all use XAML understandably. However being limited I am having some issues, and not finding any help.

    I threw a rar file on my web server that contains all the code, images used, and solution for visual studios 2010. I don't think there should be any reverse compatibility issues from vs08.

    http://thejustme.isa-geek.net/files/GameProject.rar

    My code is generating the error "Element already has a logical parent. It must be detached from the old parent before it is attached to a new one."

    basically I am using an array in a class to store a bunch of png images. In the main window I created a stack with a uniform grid child. In each of the uniform grid spots I am adding a list box. This part works just fine. Then I add a tile to the list box and it throws that error. I have a vague idea that there is an issue with the image belonging to the array in the sprite class, and some how I am unable to get anything but a reference returned to add to the list box and there for it won't assign 2 parents to the same object.

    At least that's my assumption. Any help or nudge in the right direction would be greatly appreciated. The other question I am wondering about is, is there a more efficient way to build a 2d tile map from png tiles other than the uniform grid?

    thanks in advance for any help.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center