Search code examples
c#silverlightstateblendstackpanel

How can I create a Mouse Hover State on Silverlight for a Stack Panel?


I am trying to create a mouse hover state which it changes its opacity when a mouse is over the stack panel.

I have created the state, and created a mouse_enter event for the stack panel, and on the code behind cs file, I have the following code on Mouse_Enter event.

MouseOver.Begin();

Where MouseOver is the StoryBoard's name, but when my mouse is hovering over the stack panel or even click on the stack panel, nothing happened, what am I missing?

Thanks

PlayKid


Solution

  • I figured out myself.

    With this code:

    VisualStateManager.GoToState

    Thanks everyone.