Blend 2 SP1 is confused when uses custom control which has the name end with 'Extension'


  • Hello, I found an interesting bug or something today.
    When Blend 2 SP1 uses custom control which has the name end with 'Extension', it can't edit a template by 'Edit a copy' method. Interestingly, only 'Extension' raises the problem in Blend 2, not Visual Studio. I don't know why Blend 2 is confused like that.

    I'm not good at English. It's too hard to explain this situation for me. So, I just attached sample project that contains certain problem.
    Open the project up with Blend 2, and try to change template by 'Edit a copy' method. Then you can see what problem is.

    You can download the project at HERE.

    Thanks, a lot.

    Thursday, October 16, 2008 11:07 PM


All replies

  • Well, your project still works fine for me. I tried to right click the MarkerExtension in your main Page, and edit a copy of its default template. Blend then generates a Template which contains a Grid and an Ellipse. All Visual States are also generated correctly. I can edit the Template as I wish. Which version of Blend 2 SP1 are you using? Make sure you're using the RTW version of Silverlight 2 and RTW version of Blend 2 SP1. If the versions are mismatch, you may run into problems.

    Friday, October 17, 2008 12:24 AM
  • Oh sorry about my poor English :(
    I'm absolutely sure I installed correct RTW version.
    Oh! and what I mentioned is actually, 'Edit a copy' method is available but it doesn't work correctly. 'Edit a copy' method should copy a custom control's default template. But sometimes it doesn't copy a default template. I'm going to try to explain that. (It's too difficult for me T.T)

    Have you tried with MediaPlayer too? The problem is raised when MarkerExtension is contained by other Custom Control like MediaPlayer. I think, MarkerExtension is a suspect. And SomeExtension also have a same problem.

    There are 4 custom controls in my main Page as you can see. MediaPlayer, NewMediaPlayer, MarkerExtension and HappyPlayer.
    - MediaPlayer's default style is defined in generic.xaml(same all), and it contains MarkerExtension.
    - NewMediaPlayer's default style contains SomeExtension.
    - HappyPlayer's default style contains SomeControl.
    - All "Player" has same structure, but contain different 'Marker' element in its default template.
    - MarkerExtension, SomeExtension and SomeControl has totally same except the control's name and Fill color to indentify it(it's not important).

    In this situation, Only HappyPlayer which contains SomeControl works fine with 'Edit a copy' method. A new template is copied from original one.
    But MediaPlayer and NewMediaPlayer don't work correctly. It contains anything at all even I choose a 'Edit a copy' menu.

    It's so strange. Because there is no difference between MarkerExtension and SomeControl except the name.
    I think, this problem is raised when a custom control contains another custom control which has the name end with 'Extension'.

    Friday, October 17, 2008 1:26 AM
  • Indeed. Thanks for reporting this issue! I've forwarded it to Expression Blend team.

    Friday, October 17, 2008 1:53 AM