RadDiagramShape problem

1 posts, 0 answers
  1. Nikola
    Nikola avatar
    3 posts
    Member since:
    Oct 2012

    Posted 15 Oct 2012 Link to this post

    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 !
Back to Top