This is a migrated thread and some comments may be shown as answers.

RadDiagramShape problem

0 Answers 29 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Nikola
Top achievements
Rank 1
Nikola asked on 15 Oct 2012, 11:32 AM
Hello,

I noticed that when the following code is executed there is an exception "The expression cannot be evaluated as it comes from an untrusted assembly. Only expressions consisting of field or property fetches are allowed."

RadDiagramShape shape = new RadDiagramShape();// here exception occurs

So there is a problem in the next construction:

public MyDerivedClass : RadDiagramShape
{....}

somewhere we have:
 MyDerivedClass derived = new MyDerivedClass();//here there is the same exception
..
diagram_ShapeDeserialized(object sender, ShapeSerializationRoutedEventArgs e)
        {
            if (e.Shape != null)
            {
                if (e.Shape is MyDerivedClass) //also here
........

Then e.Shape is of type MyDerivedClass but despite this fact my if operator says that it is not of type MyDerivedClass..

So is there a problem in my code ot there is some general problem

Thank you !

No answers yet. Maybe you can help?

Tags
Diagram
Asked by
Nikola
Top achievements
Rank 1
Share this question
or