locked
Are Loaded and LayoutUpdaded working on Expression Bend 4? RRS feed

  • Question

  • Hello,

    I discovered Expression Blend not a long time ago and it is really cool, especially Sketchflow. It has a lot of potential and may well be the application I am looking for to design GUI in our RnD department.

    Unfortunately, during the evaluation process, I bump into some troubles that may well be bugs, but they are so obvious I'm wondering if I do things rights (I double-checked everything though).

    So my problem is:
    When I switch from a screen to another, the state of the connected component, called upon a Loaded event trigger, is not always applied.

    My example is a simplified version of a practical case I plan to use a lot: using the navigation in the Map widget to allow the user to go from one GUI screenshot to another.
    I created a component, named ABC, with 3 images in it, A, B and C, and one state per image. This component is connected to 3 screens, A, B and C. Each screen has an action with the LayoutRoot as source, a Loaded as event name and calling the right target state of ABC.

    I expected the following behavior: when the user clic on a node screen in the Map widget of the player, the screen is displayed with the specified state of the component ABC, in other words the image A, B or C.

    What happens is that most of the time, but not always, it is not the component state which is loaded but the base state.

    It happens on WPF and Silverlight projects.

    I tried to replace the Loaded event by a LayoutUpdated event but on both projects this freezes the player...


    This is a link to 2 projects with the described scenario: (direct link not working apparently because it is my first post): https://skydrive.live.com/redir?resid=E102D27EEDC5DA04!107

    I use Expression Blend 4. SP1 should be installed but I don't see any mention of it when I call the About screen.

    Thank you for your help and feedback

    Tuesday, November 6, 2012 7:59 AM

Answers

  • I opened up the WPF version, there are transitions (because they are there by default I believe) on the Navigation connections. Right click them, select Transition Style and pick none instead. Then it should work.
    • Marked as answer by Werwack Tuesday, November 6, 2012 3:46 PM
    Tuesday, November 6, 2012 2:05 PM
    Moderator

All replies

  • I haven't looked at your project yet, but there is a known issue loading states via a behavior/trigger on the loaded event if you have transitions applied to your navigations between screens. This is because the transitions use visual states themselves, so the trigger fails to load the intended visual state. 
    Tuesday, November 6, 2012 1:55 PM
    Moderator
  • Thank you for your answer.

    In the projects there are no transitions - or at least there shouldn't be any transitions - they are not required in what I try to achieve.

    I'll double-check to see if there are some.

    Tuesday, November 6, 2012 1:59 PM
  • I opened up the WPF version, there are transitions (because they are there by default I believe) on the Navigation connections. Right click them, select Transition Style and pick none instead. Then it should work.
    • Marked as answer by Werwack Tuesday, November 6, 2012 3:46 PM
    Tuesday, November 6, 2012 2:05 PM
    Moderator
  • Thank you very much for the explanation on how to remove a transition on a Navigation connection. I just didn't know there were transitions there.

    Indeed this fix allows a correct navigation from one screen to another, and solve my current problem.

    I still get a crash of the player, at least in SilverLight - I didn't check the other, if I use a LayerUpdated event instead of the Loaded event.

    By the way I noticed an error in the C state of ABC, A was displayed instead of C. I fixed it in the Projects archive linked above.

    Tuesday, November 6, 2012 3:46 PM