Discussion Can't rename an element... why?

  • Wednesday, September 05, 2007 7:29 PM
     
     

    This seems like it should be simple...  set a new name for an element (in this case a MediaElement)

    this.VidPlyr = this.control.content.findName("Video_Screen");  //OK

    this.VidPlyr.Name = "MyNewName";  //FAILS
    or
    this.VidPlyr.setValue("Name", "MyNewName");  //FAILS

     when I try using the VisStudio "immediate" window I get this result

    AG_E_RUNTIME_SETVALUE : Name

    Why?... The SDK says this syntax should work.

     tom

     

All Replies

  • Wednesday, September 05, 2007 7:33 PM
     
     

     Quote from Silverlight documentation "The Name property cannot be changed once it has been set"

  • Wednesday, September 05, 2007 7:48 PM
     
     

    AAACKTongue Tied There it is in B&W in the SDK!  Can't believe I was looking right at it. 

     However... that said, I'm ALSO not able to alter teh TAG property yet the SDK says:  " This property is read/write. "

    Same syntax as the way I attempted set Name also fails for Tag.

    anyone else see this?

  • Thursday, September 06, 2007 2:49 PM
     
     

     Becuase Silverlight is no good

  • Thursday, September 06, 2007 3:09 PM
     
     

    Works fine for me.  Changing the tag, that is.