internal void EnsureStyle() { if (_shouldEnsureStyle) { if (_currentState.Count > 0) { _currentState.Transition(_currentState.Peek()); } _shouldEnsureStyle = false; } if (BeforeFirstControlWritten) { BeforeFirstControlWritten = false; } }