Beispiel #1
0
        public void ClearStyles()
        {
            MakeThisCurrentApplicator();

            if (options.HasFlag(StyleApplicatorOptions.AddMessageFilter) && messageFilter != null)
            {
                Application.RemoveMessageFilter(messageFilter);
            }

            foreach (Control control in controlInfo.Keys.ToArray())
            {
                ClearStyles(control, ControlStyleOptions.Default & ~ControlStyleOptions.Recursive);
            }

            if (options.HasFlag(StyleApplicatorOptions.DisposeStyleSheet) && StyleSheet != null)
            {
                StyleSheet.Dispose();
            }

            ClearCurrentApplicator();
        }