WPF DrawingVisual from my own class
Posted
by Robbskinizer
on Stack Overflow
See other posts from Stack Overflow
or by Robbskinizer
Published on 2010-03-23T08:09:44Z
Indexed on
2010/03/23
8:13 UTC
Read the original article
Hit count: 216
wpf
Hi, Im trying to create my own class which contains a DrawingVisual, something like this
public class MyObject
{
public DrawingVisual visual;
public bool faceup;
public bool flipped;
}
I have a drag and drop from a listview to a canvas, but when I try to get the object which back from the Canvas i only get the visual, not any of the other stuff in the class.
How do i save "objects" and retreive it from a canvas? Im using my own MyCanvas which inheritance from Canvas, and using the AddVisualChild & AddLogicalChild etc.
// Robbin
© Stack Overflow or respective owner