I have two controls - control 2 inside of control 1. Control 1 and Control 2 have visual states.
I am facing the following problem:
Control 2 goes into a visual state, (have put a Debug.Write in the C# code), but doesn't get updated visually (specified in xaml - visual state). This happens quite frequently, but, not always. I have got more than a couple of pair of eyes to look at the code and there doesn't seem to be anything wrong with it. Has anyone faced this/similar issue. Thanks.
I found the solution to this:
In scenarios where the mentioned problem occurs:
UpdateVisualStates
method is called before OnApplyTemplate
is called...I don't know why this happens...but this is the issue.