locked
Custom Control with Multiple ContentPresenter Objects RRS feed

  • Question

  • This example shows a custom control that contains two ContentPresenter objects:

    http://jobijoy.blogspot.com/2009/04/3d-flipper-control-using-silverlight-30.html

    This works great, except when you bring it into Expression Blend.  It doesn't appear that you can edit the actual contents of the FrontContent or BackContent properties within Blend.

    So I am interested in knowing what would it take to make this custom control more Blend-friendly.  Does Expression Blend only know how to deal with certain types of custom controls, such as those that are derived from ContentControl or Panel? Is there a custom editor that could be created that would allow this custom control to be used more effectively within Blend?

    Thanks,

    -Dave Baskin

    Monday, January 3, 2011 9:03 PM

Answers

  • This sounds like a good place to use the AlternateContentProperty:

     

    http://blogs.msdn.com/b/unnir/archive/2009/03/28/alternatecontentproperty-attribute.aspx?wa=wsignin1.0

     

    • Marked as answer by DFBaskin Tuesday, January 4, 2011 4:30 PM
    Tuesday, January 4, 2011 2:54 PM
    Moderator

All replies

  • This sounds like a good place to use the AlternateContentProperty:

     

    http://blogs.msdn.com/b/unnir/archive/2009/03/28/alternatecontentproperty-attribute.aspx?wa=wsignin1.0

     

    • Marked as answer by DFBaskin Tuesday, January 4, 2011 4:30 PM
    Tuesday, January 4, 2011 2:54 PM
    Moderator
  • That's perfect!  All I had to do was add the AlternateContentProperty to the FrontContent and BackContent properties of the Flipper3DControl class and Blend now allows me to edit the content of each of these properties.  (Of course the project had to be updated to Silverlight 4 as well.)

    Thanks!

    -Dave

    Tuesday, January 4, 2011 4:30 PM