Ejemplo n.º 1
0
        /// <summary>
        /// Creates a new HTML Label
        /// </summary>
        public HtmlLabel()
        {
            SuspendLayout();

            AutoSize       = true;
            BackColor      = SystemColors.Window;
            DoubleBuffered = true;
            SetStyle(ControlStyles.ResizeRedraw, true);
            SetStyle(ControlStyles.SupportsTransparentBackColor, true);
            SetStyle(ControlStyles.Opaque, false);

            _htmlContainer = new HtmlContainer();
            _htmlContainer.AvoidImagesLateLoading = true;
            _htmlContainer.MaxSize         = MaximumSize;
            _htmlContainer.LoadComplete   += OnLoadComplete;
            _htmlContainer.LinkClicked    += OnLinkClicked;
            _htmlContainer.RenderError    += OnRenderError;
            _htmlContainer.Refresh        += OnRefresh;
            _htmlContainer.StylesheetLoad += OnStylesheetLoad;
            _htmlContainer.ImageLoad      += OnImageLoad;

            ResumeLayout(false);
        }