none
how to add "external" transition effects between states in blend

    Question

  • Blend provides some standard effects (e.g. dropshadow) and transition effects (e.g. fade).

    I know how to add "external" standard effects by Shazzam tool.

    Question: how can we add "external" transition effect to blend?

    Thursday, December 16, 2010 5:16 PM

All replies

  • Build your effect using shazzam. Compile it with shazzam. Add the .ps-file as existing item to your project; set the build action to "resource". Add the Claas (.vb or .cs) generated by shazzam to your project. Rebuild. In Blend you should see your custom effect in the objects pane. Drag & drop the effect onto a UI-Element.
    Thursday, December 16, 2010 6:33 PM
  • Yes, effect appears in Assets -> Effects, but when I try to add effect in visual state manager (transitions) in dropdown list - there is no new effect. Maybe I used wrong shader?
    Thursday, December 16, 2010 9:27 PM
  • Hello Marek,

    now I know where you are in the UI of Blend... I tested it myself with a custom shader effect and it worked in the asset panel but not in the drop down menu of the visualstatemanager in Blend.

    I guess a possible reason is that the effects in the customvisualstatemanager are part of the ExtendedVisualStateManager and the transition effect does work on a VisualState and not on single elements. (I hope I understood this correctly).

    But I found a possible workaround for you, which you might want to test for your scenario:

    You could use the technique, that you can visually apply more than one effect on a single element. To achieve this, you apply your custom effect for example on one element, e.g. a rectangle. This element, the rectangle, you place inside a parent element, e.g. a Grid, so that the Rectangle is a child element of the Grid, which is parent. To the parent Grid element you apply another effect, which will be responsible for the effect on the transition between two states. (you could also apply the two effects on the elements vice versa or use both effects to define the transition on the rectangle element). As a result, you get both effects visually on the Rectangle element over the timeline of the transition between the two visual states.

    Hope this helps. Please post again if it doesn't.

    Friday, December 17, 2010 9:37 AM