tags:

views:

101

answers:

1

Hello,

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

+2  A: 
  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
Graeme Bradbury