Villager
Villager

Reputation: 6689

Silverlight - VisualStateManager

I'm playing around with the VisualStateManager and I have a couple of questions.

  1. Is it possible to determine the visual state that a Control is in through the VisualStateManager? If so, how?

  2. Is there a way to programmatically access a "part" of a control? If so, how?

Thank you

Upvotes: 0

Views: 201

Answers (1)

Graeme Bradbury
Graeme Bradbury

Reputation: 3721

  1. Out of the box it's not possible. With some work it is possible. VSM supports the concept of a custom VSM. So you can extend VSM to keep track of current state and then attach this custom VSM to to the elements whose state you need to track.

CustomVisualStateManger docs

  1. If you know the name of the part you can call GetTemplateChild

Upvotes: 2

Related Questions