This is a migrated thread and some comments may be shown as answers.

Application Button Text

13 Answers 185 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
Pierre Alain
Top achievements
Rank 1
Pierre Alain asked on 30 Mar 2011, 05:21 AM
How do I set Text for the Application button?

Using Office 2010 theme, it only shows the blue tab with the selected image. I can remove the image, but have found no way to set Text.

13 Answers, 1 is accepted

Sort by
0
Richard Slade
Top achievements
Rank 2
answered on 31 Mar 2011, 11:09 AM
Hello,

You can set text on this button in the same way as other RadButtonElements. For exmaple:
this.radRibbonBar1.RibbonBarElement.ApplicationButtonElement.Image = null;
this.radRibbonBar1.RibbonBarElement.ApplicationButtonElement.Text = "App";
this.radRibbonBar1.RibbonBarElement.ApplicationButtonElement.DisplayStyle = Telerik.WinControls.DisplayStyle.Text;

Hope this helps but let me know if you have further questions.
Richard
0
Pierre Alain
Top achievements
Rank 1
answered on 01 Apr 2011, 01:53 PM
Thanks.

There seems to be a small display problem with the Office 2010 Silver theme. As shown in the attached picture, the File tab overlaps the Settings tab. As soon I click on another window, it settle back into place.

0
Richard Slade
Top achievements
Rank 2
answered on 01 Apr 2011, 02:03 PM
Hello,

I haven't been able to replicate your issue. Please can you post a small sample that demonstrates how to replicate this.
Thanks
Richard
0
Pierre Alain
Top achievements
Rank 1
answered on 01 Apr 2011, 02:53 PM
Using VS 2010 and Windows 7 Ultimate.

Here is the code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using TelerikTest;
  
namespace TelerikLocalizationTest
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new ToolboxForm2());
        }
    }
}

And the designer:

namespace TelerikTest
{
    partial class ToolboxForm2
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;
  
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }
  
        #region Windows Form Designer generated code
  
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ToolboxForm2));
            this.rtSettings = new Telerik.WinControls.UI.RibbonTab();
            this.rtCreate = new Telerik.WinControls.UI.RibbonTab();
            this.radRibbonBar1 = new Telerik.WinControls.UI.RadRibbonBar();
            this.radStatusStrip1 = new Telerik.WinControls.UI.RadStatusStrip();
            this.panel1 = new System.Windows.Forms.Panel();
            this.office2010SilverTheme1 = new Telerik.WinControls.Themes.Office2010SilverTheme();
            ((System.ComponentModel.ISupportInitialize)(this.radRibbonBar1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.radStatusStrip1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
            this.SuspendLayout();
            // 
            // rtSettings
            // 
            this.rtSettings.AccessibleDescription = "Settings";
            this.rtSettings.AccessibleName = "Settings";
            this.rtSettings.Alignment = System.Drawing.ContentAlignment.BottomLeft;
            // 
            // rtSettings.ContentPanel
            // 
            this.rtSettings.ContentPanel.BackColor = System.Drawing.SystemColors.ControlLightLight;
            this.rtSettings.ContentPanel.CausesValidation = true;
            this.rtSettings.ContentPanel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
            this.rtSettings.ContentPanel.ForeColor = System.Drawing.SystemColors.ControlText;
            this.rtSettings.ContentPanel.Location = new System.Drawing.Point(0, 0);
            this.rtSettings.ContentPanel.Size = new System.Drawing.Size(200, 100);
            this.rtSettings.IsSelected = true;
            this.rtSettings.Margin = new System.Windows.Forms.Padding(2, 0, 0, 0);
            this.rtSettings.Name = "rtSettings";
            this.rtSettings.StretchHorizontally = false;
            this.rtSettings.Text = "Settings";
            this.rtSettings.Visibility = Telerik.WinControls.ElementVisibility.Visible;
            // 
            // rtCreate
            // 
            this.rtCreate.AccessibleDescription = "Create";
            this.rtCreate.AccessibleName = "Create";
            this.rtCreate.Alignment = System.Drawing.ContentAlignment.BottomLeft;
            // 
            // rtCreate.ContentPanel
            // 
            this.rtCreate.ContentPanel.BackColor = System.Drawing.SystemColors.ControlLightLight;
            this.rtCreate.ContentPanel.CausesValidation = true;
            this.rtCreate.ContentPanel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
            this.rtCreate.ContentPanel.ForeColor = System.Drawing.SystemColors.ControlText;
            this.rtCreate.ContentPanel.Location = new System.Drawing.Point(0, 0);
            this.rtCreate.ContentPanel.Size = new System.Drawing.Size(200, 100);
            this.rtCreate.Name = "rtCreate";
            this.rtCreate.StretchHorizontally = false;
            this.rtCreate.Text = "Create";
            this.rtCreate.Visibility = Telerik.WinControls.ElementVisibility.Visible;
            // 
            // radRibbonBar1
            // 
            this.radRibbonBar1.AutoSize = true;
            this.radRibbonBar1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(219)))), ((int)(((byte)(254)))));
            this.radRibbonBar1.CommandTabs.AddRange(new Telerik.WinControls.RadItem[] {
            this.rtSettings,
            this.rtCreate});
            this.radRibbonBar1.Dock = System.Windows.Forms.DockStyle.Top;
            this.radRibbonBar1.EnableKeyMap = true;
            // 
            // 
            // 
            this.radRibbonBar1.ExitButton.AccessibleDescription = "Exit";
            this.radRibbonBar1.ExitButton.AccessibleName = "Exit";
            // 
            // 
            // 
            this.radRibbonBar1.ExitButton.ButtonElement.AccessibleDescription = "Exit";
            this.radRibbonBar1.ExitButton.ButtonElement.AccessibleName = "Exit";
            this.radRibbonBar1.ExitButton.ButtonElement.Class = "RadMenuButtonElement";
            this.radRibbonBar1.ExitButton.ButtonElement.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
            this.radRibbonBar1.ExitButton.Text = "Exit";
            this.radRibbonBar1.Location = new System.Drawing.Point(0, 0);
            this.radRibbonBar1.Name = "radRibbonBar1";
            // 
            // 
            // 
            this.radRibbonBar1.OptionsButton.AccessibleDescription = "Options";
            this.radRibbonBar1.OptionsButton.AccessibleName = "Options";
            // 
            // 
            // 
            this.radRibbonBar1.OptionsButton.ButtonElement.AccessibleDescription = "Options";
            this.radRibbonBar1.OptionsButton.ButtonElement.AccessibleName = "Options";
            this.radRibbonBar1.OptionsButton.ButtonElement.Class = "RadMenuButtonElement";
            this.radRibbonBar1.OptionsButton.ButtonElement.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
            this.radRibbonBar1.OptionsButton.Text = "Options";
            // 
            // 
            // 
            this.radRibbonBar1.RootElement.AccessibleDescription = null;
            this.radRibbonBar1.RootElement.AccessibleName = null;
            this.radRibbonBar1.RootElement.Alignment = System.Drawing.ContentAlignment.TopLeft;
            this.radRibbonBar1.RootElement.AngleTransform = 0F;
            this.radRibbonBar1.RootElement.AutoSizeMode = Telerik.WinControls.RadAutoSizeMode.WrapAroundChildren;
            this.radRibbonBar1.RootElement.FlipText = false;
            this.radRibbonBar1.RootElement.Margin = new System.Windows.Forms.Padding(0);
            this.radRibbonBar1.RootElement.Padding = new System.Windows.Forms.Padding(0);
            this.radRibbonBar1.RootElement.Text = null;
            this.radRibbonBar1.RootElement.TextOrientation = System.Windows.Forms.Orientation.Horizontal;
            this.radRibbonBar1.Size = new System.Drawing.Size(722, 144);
            this.radRibbonBar1.StartButtonImage = ((System.Drawing.Image)(resources.GetObject("radRibbonBar1.StartButtonImage")));
            this.radRibbonBar1.TabIndex = 0;
            this.radRibbonBar1.Text = "Toolbox";
            ((Telerik.WinControls.UI.RadRibbonBarElement)(this.radRibbonBar1.GetChildAt(0))).Text = "Toolbox";
            ((Telerik.WinControls.UI.RadImageButtonElement)(this.radRibbonBar1.GetChildAt(0).GetChildAt(7))).Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
            // 
            // radStatusStrip1
            // 
            this.radStatusStrip1.AutoSize = true;
            this.radStatusStrip1.LayoutStyle = Telerik.WinControls.UI.RadStatusBarLayoutStyle.Stack;
            this.radStatusStrip1.Location = new System.Drawing.Point(0, 656);
            this.radStatusStrip1.Name = "radStatusStrip1";
            // 
            // 
            // 
            this.radStatusStrip1.RootElement.AccessibleDescription = null;
            this.radStatusStrip1.RootElement.AccessibleName = null;
            this.radStatusStrip1.RootElement.Alignment = System.Drawing.ContentAlignment.TopLeft;
            this.radStatusStrip1.RootElement.AngleTransform = 0F;
            this.radStatusStrip1.RootElement.FlipText = false;
            this.radStatusStrip1.RootElement.Margin = new System.Windows.Forms.Padding(0);
            this.radStatusStrip1.RootElement.Padding = new System.Windows.Forms.Padding(0);
            this.radStatusStrip1.RootElement.Text = null;
            this.radStatusStrip1.RootElement.TextOrientation = System.Windows.Forms.Orientation.Horizontal;
            this.radStatusStrip1.Size = new System.Drawing.Size(722, 26);
            this.radStatusStrip1.SizingGrip = false;
            this.radStatusStrip1.TabIndex = 1;
            this.radStatusStrip1.Text = "radStatusStrip1";
            // 
            // panel1
            // 
            this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.panel1.Location = new System.Drawing.Point(0, 144);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(722, 512);
            this.panel1.TabIndex = 2;
            // 
            // ToolboxForm2
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
            this.ClientSize = new System.Drawing.Size(722, 682);
            this.Controls.Add(this.panel1);
            this.Controls.Add(this.radStatusStrip1);
            this.Controls.Add(this.radRibbonBar1);
            this.Name = "ToolboxForm2";
            // 
            // 
            // 
            this.RootElement.AccessibleDescription = null;
            this.RootElement.AccessibleName = null;
            this.RootElement.AngleTransform = 0F;
            this.RootElement.ApplyShapeToControl = true;
            this.RootElement.FlipText = false;
            this.RootElement.Margin = new System.Windows.Forms.Padding(0);
            this.RootElement.Padding = new System.Windows.Forms.Padding(0);
            this.RootElement.Text = null;
            this.RootElement.TextOrientation = System.Windows.Forms.Orientation.Horizontal;
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "Toolbox";
            this.TopMost = true;
            ((System.ComponentModel.ISupportInitialize)(this.radRibbonBar1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.radStatusStrip1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();
  
        }
  
        #endregion
  
        private Telerik.WinControls.UI.RadRibbonBar radRibbonBar1;
        private Telerik.WinControls.UI.RadStatusStrip radStatusStrip1;
        private System.Windows.Forms.Panel panel1;
        private Telerik.WinControls.UI.RibbonTab rtSettings;
        private Telerik.WinControls.UI.RibbonTab rtCreate;
        private Telerik.WinControls.Themes.Office2010SilverTheme office2010SilverTheme1;
    }
}
0
Pierre Alain
Top achievements
Rank 1
answered on 01 Apr 2011, 02:56 PM
Sorry, I forgot the actual Form code:

 

using Telerik.WinControls;
  
namespace TelerikTest
{
    public partial class ToolboxForm2 : Telerik.WinControls.UI.RadRibbonForm
    {
        public ToolboxForm2()
        {
            InitializeComponent();
  
            ThemeResolutionService.ApplicationThemeName = "Office2010Silver";
  
            radRibbonBar1.RibbonBarElement.ApplicationButtonElement.Image = null;
            radRibbonBar1.RibbonBarElement.ApplicationButtonElement.Text = "File";
            radRibbonBar1.RibbonBarElement.ApplicationButtonElement.DisplayStyle = Telerik.WinControls.DisplayStyle.Text;
        }
    }
}

 

 

 

 

0
Richard Slade
Top achievements
Rank 2
answered on 01 Apr 2011, 03:23 PM
Hello,

I see the issue on the code you have posted, but I haven't been able to replicate it on a new form. Please can you try this one and see if you can replicate it.

Designer File
namespace RadControlsWinFormsApp2
{
    partial class RadRibbonForm1
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;
  
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }
  
        #region Windows Form Designer generated code
  
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.radRibbonBar1 = new Telerik.WinControls.UI.RadRibbonBar();
            this.ribbonTab1 = new Telerik.WinControls.UI.RibbonTab();
            this.ribbonTab2 = new Telerik.WinControls.UI.RibbonTab();
            this.ribbonTab3 = new Telerik.WinControls.UI.RibbonTab();
            this.radStatusStrip1 = new Telerik.WinControls.UI.RadStatusStrip();
            this.panel1 = new System.Windows.Forms.Panel();
            this.office2010SilverTheme1 = new Telerik.WinControls.Themes.Office2010SilverTheme();
            ((System.ComponentModel.ISupportInitialize)(this.radRibbonBar1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.radStatusStrip1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
            this.SuspendLayout();
            // 
            // radRibbonBar1
            // 
            this.radRibbonBar1.AutoSize = true;
            this.radRibbonBar1.CommandTabs.AddRange(new Telerik.WinControls.RadItem[] {
            this.ribbonTab1,
            this.ribbonTab2,
            this.ribbonTab3});
            this.radRibbonBar1.Dock = System.Windows.Forms.DockStyle.Top;
            this.radRibbonBar1.EnableKeyMap = true;
            // 
            // 
            // 
            this.radRibbonBar1.ExitButton.AccessibleDescription = "Exit";
            this.radRibbonBar1.ExitButton.AccessibleName = "Exit";
            // 
            // 
            // 
            this.radRibbonBar1.ExitButton.ButtonElement.AccessibleDescription = "Exit";
            this.radRibbonBar1.ExitButton.ButtonElement.AccessibleName = "Exit";
            this.radRibbonBar1.ExitButton.ButtonElement.Class = "RadMenuButtonElement";
            this.radRibbonBar1.ExitButton.ButtonElement.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
            this.radRibbonBar1.ExitButton.Text = "Exit";
            this.radRibbonBar1.Location = new System.Drawing.Point(0, 0);
            this.radRibbonBar1.Name = "radRibbonBar1";
            // 
            // 
            // 
            this.radRibbonBar1.OptionsButton.AccessibleDescription = "Options";
            this.radRibbonBar1.OptionsButton.AccessibleName = "Options";
            // 
            // 
            // 
            this.radRibbonBar1.OptionsButton.ButtonElement.AccessibleDescription = "Options";
            this.radRibbonBar1.OptionsButton.ButtonElement.AccessibleName = "Options";
            this.radRibbonBar1.OptionsButton.ButtonElement.Class = "RadMenuButtonElement";
            this.radRibbonBar1.OptionsButton.ButtonElement.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
            this.radRibbonBar1.OptionsButton.Text = "Options";
            // 
            // 
            // 
            this.radRibbonBar1.RootElement.AutoSizeMode = Telerik.WinControls.RadAutoSizeMode.WrapAroundChildren;
            this.radRibbonBar1.Size = new System.Drawing.Size(474, 153);
            this.radRibbonBar1.StartButtonImage = null;
            this.radRibbonBar1.TabIndex = 0;
            this.radRibbonBar1.Text = "RadRibbonForm1";
            this.radRibbonBar1.ThemeName = "Office2010Silver";
            // 
            // ribbonTab1
            // 
            this.ribbonTab1.AccessibleDescription = "Settings";
            this.ribbonTab1.AccessibleName = "Settings";
            this.ribbonTab1.Alignment = System.Drawing.ContentAlignment.BottomLeft;
            // 
            // ribbonTab1.ContentPanel
            // 
            this.ribbonTab1.ContentPanel.BackColor = System.Drawing.SystemColors.ControlLightLight;
            this.ribbonTab1.ContentPanel.CausesValidation = true;
            this.ribbonTab1.ContentPanel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.ribbonTab1.ContentPanel.ForeColor = System.Drawing.SystemColors.ControlText;
            this.ribbonTab1.ContentPanel.Location = new System.Drawing.Point(0, 0);
            this.ribbonTab1.ContentPanel.Size = new System.Drawing.Size(200, 100);
            this.ribbonTab1.Name = "ribbonTab1";
            this.ribbonTab1.StretchHorizontally = false;
            this.ribbonTab1.Text = "Settings";
            this.ribbonTab1.Visibility = Telerik.WinControls.ElementVisibility.Visible;
            // 
            // ribbonTab2
            // 
            this.ribbonTab2.AccessibleDescription = "Create";
            this.ribbonTab2.AccessibleName = "Create";
            this.ribbonTab2.Alignment = System.Drawing.ContentAlignment.BottomLeft;
            // 
            // ribbonTab2.ContentPanel
            // 
            this.ribbonTab2.ContentPanel.BackColor = System.Drawing.SystemColors.ControlLightLight;
            this.ribbonTab2.ContentPanel.CausesValidation = true;
            this.ribbonTab2.ContentPanel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.ribbonTab2.ContentPanel.ForeColor = System.Drawing.SystemColors.ControlText;
            this.ribbonTab2.ContentPanel.Location = new System.Drawing.Point(0, 0);
            this.ribbonTab2.ContentPanel.Size = new System.Drawing.Size(200, 100);
            this.ribbonTab2.Name = "ribbonTab2";
            this.ribbonTab2.StretchHorizontally = false;
            this.ribbonTab2.Text = "Create";
            this.ribbonTab2.Visibility = Telerik.WinControls.ElementVisibility.Visible;
            // 
            // ribbonTab3
            // 
            this.ribbonTab3.AccessibleDescription = "Create";
            this.ribbonTab3.AccessibleName = "Create";
            this.ribbonTab3.Alignment = System.Drawing.ContentAlignment.BottomLeft;
            // 
            // ribbonTab3.ContentPanel
            // 
            this.ribbonTab3.ContentPanel.BackColor = System.Drawing.SystemColors.ControlLightLight;
            this.ribbonTab3.ContentPanel.CausesValidation = true;
            this.ribbonTab3.ContentPanel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.ribbonTab3.ContentPanel.ForeColor = System.Drawing.SystemColors.ControlText;
            this.ribbonTab3.ContentPanel.Location = new System.Drawing.Point(0, 0);
            this.ribbonTab3.ContentPanel.Size = new System.Drawing.Size(200, 100);
            this.ribbonTab3.IsSelected = true;
            this.ribbonTab3.Name = "ribbonTab3";
            this.ribbonTab3.StretchHorizontally = false;
            this.ribbonTab3.Text = "Create";
            this.ribbonTab3.Visibility = Telerik.WinControls.ElementVisibility.Visible;
            // 
            // radStatusStrip1
            // 
            this.radStatusStrip1.AutoSize = true;
            this.radStatusStrip1.LayoutStyle = Telerik.WinControls.UI.RadStatusBarLayoutStyle.Stack;
            this.radStatusStrip1.Location = new System.Drawing.Point(0, 399);
            this.radStatusStrip1.Name = "radStatusStrip1";
            this.radStatusStrip1.Size = new System.Drawing.Size(474, 26);
            this.radStatusStrip1.SizingGrip = false;
            this.radStatusStrip1.TabIndex = 1;
            this.radStatusStrip1.Text = "radStatusStrip1";
            // 
            // panel1
            // 
            this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.panel1.Location = new System.Drawing.Point(0, 153);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(474, 246);
            this.panel1.TabIndex = 2;
            // 
            // RadRibbonForm1
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(474, 425);
            this.Controls.Add(this.panel1);
            this.Controls.Add(this.radStatusStrip1);
            this.Controls.Add(this.radRibbonBar1);
            this.Name = "RadRibbonForm1";
            // 
            // 
            // 
            this.RootElement.ApplyShapeToControl = true;
            this.Text = "RadRibbonForm1";
            ((System.ComponentModel.ISupportInitialize)(this.radRibbonBar1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.radStatusStrip1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();
  
        }
  
        #endregion
  
        private Telerik.WinControls.UI.RadRibbonBar radRibbonBar1;
        private Telerik.WinControls.UI.RadStatusStrip radStatusStrip1;
        private System.Windows.Forms.Panel panel1;
        private Telerik.WinControls.Themes.Office2010SilverTheme office2010SilverTheme1;
        private Telerik.WinControls.UI.RibbonTab ribbonTab1;
        private Telerik.WinControls.UI.RibbonTab ribbonTab2;
        private Telerik.WinControls.UI.RibbonTab ribbonTab3;
    }
}

RadRibbonForm1.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Telerik.WinControls;
  
namespace RadControlsWinFormsApp2
{
    public partial class RadRibbonForm1 : Telerik.WinControls.UI.RadRibbonForm
    {
        public RadRibbonForm1()
        {
            InitializeComponent();
            ThemeResolutionService.ApplicationThemeName = "Office2010Silver";
  
            radRibbonBar1.RibbonBarElement.ApplicationButtonElement.Image = null;
            radRibbonBar1.RibbonBarElement.ApplicationButtonElement.Text = "File";
            radRibbonBar1.RibbonBarElement.ApplicationButtonElement.DisplayStyle = Telerik.WinControls.DisplayStyle.Text;
        }
  
    }
}

There must be a difference that I haven't spotted yet. Let me know how that one looks.
Thanks
Richard
0
Pierre Alain
Top achievements
Rank 1
answered on 01 Apr 2011, 04:09 PM
I found it:

this.TopMost = true;

If I remove this line, it works fine.
0
Richard Slade
Top achievements
Rank 2
answered on 01 Apr 2011, 04:17 PM
Hello,

Glad you have found the issue. As you suggested, I'd agree that this is a bug in the theme. This should be reported via a bug report (support ticket). If you're unable to do that, then let me know and I'll send one off.
Thanks
Richard
0
Pierre Alain
Top achievements
Rank 1
answered on 01 Apr 2011, 05:32 PM
I made a bug report.

Thanks for all your help.
0
Ivan Todorov
Telerik team
answered on 04 Apr 2011, 03:35 PM
Hi pacarrier,

Indeed, there is an issue with the Office2010Silver theme of the RadRibbonBar whet it is put on a topmost form. The issue will be addressed in the next release. For the time being, I can provide you with the following workaround. Just override the OnShown method of your form and set the following property:
protected override void OnShown(EventArgs e)
{
    base.OnShown(e);
    this.radRibbonBar1.RibbonBarElement.TabStripElement.VisualState = "RadTabStripElement";
}

Your Telerik points have been updated for bringing this issue to our attention.

I hope this helps. Feel free to write back if you have any further questions.

Best wishes,
Ivan Todorov
the Telerik team
0
Pierre Alain
Top achievements
Rank 1
answered on 04 Apr 2011, 05:43 PM
Thank you.
0
Xavier Soares
Top achievements
Rank 2
answered on 26 May 2011, 02:23 PM
Hello,

Sorry my ignorance but where can I put this code?

I'm using vb.net and I can't find any place to put  OnShown method .

thank you.
Luís Maurício
0
Ivan Todorov
Telerik team
answered on 28 May 2011, 12:29 PM
Hello Luis,

Here is the VB equivalent of the code in my previous post:
Public Class Form1
 
    Protected Overrides Sub OnShown(e As System.EventArgs)
        MyBase.OnShown(e)
        Me.radRibbonBar1.RibbonBarElement.TabStripElement.VisualState = "RadTabStripElement"
    End Sub
 
End Class

As you can see from this example, the OnShown method should be placed in your form's class.

I hope this will help you. Do not hesitate to ask if you have any additional questions.

Greetings,
Ivan Todorov
the Telerik team
Q1’11 SP1 of RadControls for WinForms is available for download; also available is the Q2'11 Roadmap for Telerik Windows Forms controls.
Tags
RibbonBar
Asked by
Pierre Alain
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Pierre Alain
Top achievements
Rank 1
Ivan Todorov
Telerik team
Xavier Soares
Top achievements
Rank 2
Share this question
or