コード例 #1
0
 public static void SetGlobalStyle(string style)
 {
     // Make a copy of the collection since it may be referenced from context instances,
     // which don't expect the collection to change
     globalStyles = globalStyles.Add(style);
     NotifyGlobalStylesChanged();
 }
コード例 #2
0
        public void SetStyle(string style)
        {
            if (string.IsNullOrEmpty(style))
            {
                throw new ArgumentException("style can't be empty");
            }

            if (style[0] == '!')
            {
                styles = styles.Remove(style.Substring(1));
            }
            else
            {
                styles = styles.Add(style);
            }
            handler.SetStyles(Backend, styles);
        }