Technology: Silverlight 3.0
Problem: I need to know which method from Silverlight framework changes the VisualState of a control and when.
Solution: Develop a Custom VisualStateManager and override the GoToStateCore method (which is the only method that can be overriden), doing a Debug.WriteLine with Debug information. I decided to write the information on debug instead of setting a breakpoint, because the breakpoint might alter the behavior of the VisualStateManager. Another thing to remember is to call the base method when overriding GoToStateCore.
You could also set it through the static method: VisualStateManager.SetCustomVisualStateManager(FrameworkElement,VisualStateManager);
No hay comentarios:
Publicar un comentario