コード例 #1
0
        /// <summary>
        /// Remove a style from the document.
        /// </summary>
        /// <param name="styles">collection where the style to belongs</param>
        /// <param name="style">to be removed</param>
        private void RemoveStyle(ICSSStyleDeclaration styles, KeyValuePair <string, string> style)
        {
            var e = new RemovingStyleEventArgs {
                Style = style
            };

            OnRemovingStyle(e);
            if (!e.Cancel)
            {
                styles.RemoveStyle(style.Key);
            }
        }
コード例 #2
0
 /// <summary>
 /// Remove a style from the document.
 /// </summary>
 /// <param name="styles">collection where the style to belongs</param>
 /// <param name="style">to be removed</param>
 private void RemoveStyle(ICSSStyleDeclaration styles, KeyValuePair<string, string> style)
 {
     var e = new RemovingStyleEventArgs { Style = style };
     OnRemovingStyle(e);
     if (!e.Cancel) styles.RemoveStyle(style.Key);
 }
コード例 #3
0
 public HTMLCanvasElement(ICanvasProxy proxy)
 {
     //by default timer for surface update is disabled
     timer.Enabled = false;
     Paint += HTMLCanvasElement_Paint;
     //Resize += HTMLCanvasElement_Resize;
     Name = "HTMLCanvasElement";
     _proxy = proxy;
     //style
     _style = new CSSStyleDeclaration(this);
     _style.StyleChanged += new StyleChangedHandler(OnStyleChanged);
 }