Ejemplo n.º 1
0
        void StyleScopeClose(StyleScope scope)
        {
            scope.OnDisposed -= StyleScopeClose;
            if (_styleGroupStack.Peek() != scope.Group)
            {
                throw new System.Exception("Unexpected style group attempting to close.");
            }

            _styleGroupStack.Pop();
        }
Ejemplo n.º 2
0
        protected StyleScope styleScope(StyleGroup styleGroup)
        {
            var scope = new StyleScope(styleGroup);

            scope.OnDisposed += StyleScopeClose;

            _styleGroupStack.Push(scope.Group);

            return(scope);
        }