Exemplo n.º 1
0
        public virtual void ApplyStyleSheetSkin(Page page) {
            // Nothing to do if the control is not in a Page.
            if (page == null) {
                return;
            }

            // Only apply stylesheet if not already applied.
            if (flags[styleSheetApplied]) {
                throw new InvalidOperationException(SR.GetString(SR.StyleSheetAreadyAppliedOnControl));
            }

            if (page.ApplyControlStyleSheet(this)) {
                flags.Set(styleSheetApplied);
            }
        }