/// <include file='doc\ToolStripItemTextRenderEventArgs.uex' path='docs/doc[@for="ToolStripItemTextRenderEventArgs.ToolStripItemTextRenderEventArgs"]/*' />
        /// <devdoc>
        /// This class represents all the information to render the winbar
        /// </devdoc>
        public ToolStripItemTextRenderEventArgs(Graphics g, ToolStripItem item, string text, Rectangle textRectangle, Color textColor, Font textFont, ContentAlignment textAlign) : base(g, item)
        {
            this.text             = text;
            this.textRectangle    = textRectangle;
            this.defaultTextColor = textColor;
            this.textFont         = textFont;
            this.textFormat       = ToolStripItemInternalLayout.ContentAlignToTextFormat(textAlign, item.RightToLeft == RightToLeft.Yes);

            // in 2K and XP++ hide underlined &File unless ALT is pressed
            this.textFormat = (item.ShowKeyboardCues) ? textFormat : textFormat | TextFormatFlags.HidePrefix;
            textDirection   = item.TextDirection;
        }
 public ToolStripItemTextRenderEventArgs(Graphics g, ToolStripItem item, string text, Rectangle textRectangle, Color textColor, Font textFont, ContentAlignment textAlign) : base(g, item)
 {
     this.textRectangle    = Rectangle.Empty;
     this.textColor        = SystemColors.ControlText;
     this.textDirection    = ToolStripTextDirection.Horizontal;
     this.defaultTextColor = SystemColors.ControlText;
     this.text             = text;
     this.textRectangle    = textRectangle;
     this.defaultTextColor = textColor;
     this.textFont         = textFont;
     this.textFormat       = ToolStripItemInternalLayout.ContentAlignToTextFormat(textAlign, item.RightToLeft == RightToLeft.Yes);
     this.textFormat       = item.ShowKeyboardCues ? this.textFormat : (this.textFormat | TextFormatFlags.HidePrefix);
     this.textDirection    = item.TextDirection;
 }