locked
Expression Blend 3 Visual State Manager; state conflict RRS feed

  • Question

  • Hi there.  I am attempting to control the visible property on a custom control which is a standard radio button with an image property as follows:

    The base state of the image opacity is 0%

    When the radio button is checked, I want to image opacity to be set to 100% and persist until it becomes unchecked.

    When the mouse is over the image,

    if the radio button is unchecked:
        I want to set the opacity to 100% and run a storyboard, when the mouse moves off the image, I want the opacity to be reset to the base state
    else
      do nothing

    I cannot do this as the checked and mouseover states are in different state groups.  I have tried a multitude of combinations of state transitions and property setting along with behaviors to no avail.  This seems like a fairly straightforward scenario but I cannot seem to get it to work after over a week of trying.  My goal is to create a navigation menu of button across the top of the page where the current navigated page has its associated radiobutton image visible and as the mouse glides over the other buttons, they become visible and then disappear as the mouse leaves unless the button is clicked in which case the image persists.  Any ideas?  Thanks for any help you can provide!
    Thursday, November 26, 2009 6:17 PM

All replies

  • Would you mind posting a link to your solution files?  I can't think of anything offhand because I'm pretty inexperienced with states, but perhaps there's a code-behind solution that I can get working for you.
    Friday, November 27, 2009 6:30 AM
  • you can acutally move states to the different state groups.  Try moving the "Checked" "Unchecked" states to the common sate group and see if it works.

    Monday, November 30, 2009 9:57 PM
  • Thanks for your responses guys.  I overcame the issue by adding a duplicate image in the imageradiobutton template.  I then control the opacity of one image from the mouseover state and the visibility of the other image from the checked state.  Not the cleanest solution but it works!
    Thursday, December 17, 2009 11:13 PM