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

Selected item Breadcrumb dropdownlist has different font

2 Answers 119 Views
Treeview
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 1
Patrick asked on 13 Nov 2018, 12:08 PM

Hello,

I have noticed that the font of the selected item in the breadcrumb has a different font. (see attached image)

I am using the material themes (Material, Teal, Pink and BlueGray)

Now I am trying to change the font of this selected item in the dropdownlist of the breadcrumb in the Visual Style Builder.

I have already found that the "RadMenu - Dropdown"-control is used for the dropdown list in the breadcrumb but I cannot find how to change the font for the selected item.

Could someone give me a hint how to change the font?

Regards

Patrick Vossen

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 13 Nov 2018, 01:43 PM
Hello, Patrick, 

I have logged it in our feedback portal. You can track its progress, subscribe for status changes and add your comments on the following link - feedback item.

I have also updated your Telerik points.

Currently, the possible solution that I can suggest is to use the following approach: 

public partial class RadForm1 : Telerik.WinControls.UI.RadForm
{
    public RadForm1()
    {
        InitializeComponent();
 
 
        ThemeResolutionService.ApplicationThemeName = "MaterialTeal";
 
        this.radTreeView1.NodeFormatting += radTreeView1_NodeFormatting;
        this.radTreeView1.SelectedNodeChanged += radTreeView1_SelectedNodeChanged;
    }
 
    private void UpdateFont()
    {
        foreach (RadSplitButtonElement item in this.radBreadCrumb1.BreadCrumbElement.Items)
        {
            foreach (RadMenuItem menuItem in item.Items)
            {
                if (this.radTreeView1.SelectedNode != null && menuItem.Text == this.radTreeView1.SelectedNode.Text)
                {
                    menuItem.Font = new Font(f.FontFamily,f.Size, FontStyle.Bold);
                }
            }
        }
    }
     
    private void radTreeView1_SelectedNodeChanged(object sender, Telerik.WinControls.UI.RadTreeViewEventArgs e)
    {
        UpdateFont();
    }
 
    Font f = null;
 
    private void radTreeView1_NodeFormatting(object sender, Telerik.WinControls.UI.TreeNodeFormattingEventArgs e)
    {
        f = e.NodeElement.ContentElement.Font;
    }

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Patrick
Top achievements
Rank 1
answered on 19 Nov 2018, 03:20 PM

Hi Dess,

Thanks for the solution :-)

Grtz Patrick Vossen

Tags
Treeview
Asked by
Patrick
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Patrick
Top achievements
Rank 1
Share this question
or