locked
Expression Blend Behavior within Visual Studio RRS feed

  • Question

  • I'm running into a problem with the new Expression Blend behaviors.

    I have a customized Behavior<T> class developed using the Expression Blend 3 SDK.

    The behavior works properly, and the solution compiles. That is perfect. I have all of my references (System.Windows.Interactivity.dll + Microsoft.Expression.Interactions.dll) setup in my projects that reference the behavior.

    In addition, as I mentioned, Visual Studio compiles the project fine.

    However, if I load the XAML file in the Visual Studio designer, I get the following error after the solution compiles:

    Error 1 The attachable property 'Behaviors' was not found in type 'Interaction'. C:\Path\To\MyFile.xaml 19 14 MyApplication

    That line of the file is the first line of the following:

    <
    Interactivity:Interaction
    .
    Behaviors
    >
    
       
    < Behaviors:DoubleTextBoxBehavior />
    </ Interactivity:Interaction . Behaviors >

    My window reference is setup with:

    xmlns
    :
    Interactivity
    =
    "clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
    

    I've even eliminated my custom behavior as a possibility. I can just include the following line, and "break" the designer:

    <
    Interactivity:Interaction
    .
    Behaviors
     
    />
    

    As far as I can tell, this should work. There shouldn't be an error. The compiler handles this fine, but Visual Studio won't load this in the designer any time I add the behavior line.

    Does anybody have an idea of what can cause this, and how to fix it?


    Reed Copsey, Jr. - http://reedcopsey.com
    Saturday, August 29, 2009 3:06 PM

Answers