Customisation

Hi,
Please could you let me know if there is any way of changing the colour of the "<" and ">" arrows used to collapse and expand items, or alternatively how I can create a new sytle. I would like to get something looking like office2016darkgray, using shades of dark blue insead of dark gary.
Many thanks,
Tony

10 Replies 1 reply marked as answer

EM Elakkiya Muthukumarasamy Syncfusion Team May 4, 2021 04:17 PM UTC

Hi Tony, 
 
Greetings from Syncfusion. 
 
We are working to achieve your requirement and we will update you the further details on 5th May 2021.We we appreciate your patience until then. 
 
Regards, 
Elakkiya 



TO Tony May 4, 2021 05:17 PM UTC

Hi Elakkiya,
That's great - many thanks for your help with this!
Kind regards,
Tony :-)


EM Elakkiya Muthukumarasamy Syncfusion Team May 5, 2021 11:03 AM UTC

Hi Tony, 
 
Thanks for your patience. 
 
On the further analysis we can able to changing the colour of the "<" and ">" arrows by changing TreeNavigator items forecolor using ForeColor property and the collapsed arrow(BackButtonArrowColor) is changed by using BackButtonArrowColor property of TreeNavigator. Please refer the below code example and sample for the same. 
 
Code example 
 
//Change Back Button  Arrow color 
treeNavigator.ThemeStyle.BackButtonArrowColor = Color.Red; 
 
//change expand arrow color 
treeNavigator.ThemeStyle.TreeMenuItemStyle.ForeColor = Color.Blue; 
 
 
 
 
Output : 
 
 
 
Please try it with the above solution and let us know if you need any further assistance on this. 
 
Regards, 
Elakkiya 



TO Tony May 5, 2021 05:41 PM UTC

Hi Elakkiya,

Thanks for your reply. I am using VB.NET had have tried what you have suggested but it doesn't seem to make any difference.
Here is my code:
Private Sub SetUpForm_Load(sender As Object, e As EventArgs) Handles Me.Load
        LoadPublicVaraibles()
        ConfigureTreeNavigator()

    End Sub

    Private Sub ConfigureTreeNavigator()

        'Change Back Button  Arrow color
        TreeNavigator1.ThemeStyle.BackButtonArrowColor = Color.Red

        'change expand arrow color
        TreeNavigator1.ThemeStyle.TreeMenuItemStyle.ForeColor = Color.Blue


        mnuCreateAppFiles.ItemHoverColor = Color.DimGray

        mnuAddLocations.ItemHoverColor = Color.DimGray


        ' add child items to mnuCreateAppFiles
        Dim mnuLocationsdb As New TreeMenuItem
        mnuCreateAppFiles.Items.Add(mnuLocationsdb)
        'mnuLocationsdb.ItemBackColor = MidBlue
        mnuLocationsdb.ItemHoverColor = Color.DimGray
        mnuLocationsdb.Text = "Locations Database"
        AddHandler mnuLocationsdb.Click, AddressOf mnuLocationsdb_Click

        Dim mnuMapsdb As New TreeMenuItem
        mnuCreateAppFiles.Items.Add(mnuMapsdb)
        'mnuMapsdb.ItemBackColor = MidBlue
        mnuMapsdb.ItemHoverColor = Color.DimGray
        mnuMapsdb.Text = "Maps Database"
        AddHandler mnuMapsdb.Click, AddressOf mnuMapsdb_Click
        '*****************************************
etc.

Please see that attached screenshots.
Also I'm afraid I don't know C or C# but when I tried to open the zip you sent me and load it into visula studiko it came up with the message:
The designer could not be shown for this file because none of the classes within it can be designed. The designer inspected the following classes in the file: Forml — The base class 'System.Void' cannot be desiqned.

I'm still learning VB.Net and Visual Studio so please accept my apologies if i've made any simple errors!
Thanks,
Tony

Attachment: Desktop_a7046773.zip


EM Elakkiya Muthukumarasamy Syncfusion Team May 6, 2021 11:31 AM UTC

Hi Tony, 

Thanks for your update. 

We have prepared the sample in VB.net to changing the colour of the "<" and ">" arrows. To change the expand and collapsed arrow color need to apply the theme.In this sample I have set the Office2019Colorful theme. Please refer the below code snippet and sample for the same. 

Code snippet: 
Public Sub New() 
SkinManager.LoadAssembly(GetType(Syncfusion.WinForms.Themes.Office2019Theme).Assembly) 
InitializeComponent() 
Dim treeNavigator As New TreeNavigator() 
treeNavigator.ThemeName = "Office2019Colorful" 
 
treeNavigator.Header.HeaderText = "This PC" 
Dim treemenuitem1 As New TreeMenuItem() 
treeNavigator.Items.Add(treemenuitem1) 
treemenuitem1.Text = "Desktop" 
Dim treemenuitem2 As New TreeMenuItem() 
treeNavigator.Items.Add(treemenuitem2) 
treemenuitem2.Text = "Document" 
Dim treemenuitem3 As New TreeMenuItem() 
treeNavigator.Items.Add(treemenuitem3) 
treemenuitem3.Text = "Downloads" 
Dim treemenuitem4 As New TreeMenuItem() 
treemenuitem3.Text = "Disk D" 
Dim treemenuitem5 As New TreeMenuItem() 
treemenuitem3.Text = "Disk C" 
Dim treemenuitem6 As New TreeMenuItem() 
treemenuitem3.Text = "Disk E" 
treeNavigator.NavigationMode = NavigationMode.Default 
treeNavigator.ThemeName = "Office2019Colorful" 
'Change Back Button  Arrow color 
treeNavigator.ThemeStyle.BackButtonArrowColor = Color.Red 
'change expand arrow color 
treeNavigator.ThemeStyle.TreeMenuItemStyle.ForeColor = Color.Blue 
treeNavigator.Location = New System.Drawing.Point(100, 100) 
 
'treemenuitem1.ItemHoverColor = Color.Yellow; 
treemenuitem1.Items.Add(treemenuitem4) 
treemenuitem1.Items.Add(treemenuitem5) 
treemenuitem1.Items.Add(treemenuitem6) 
Me.Controls.Add(treeNavigator) 
Me.Text = "TreeNavigator" 
End Sub 


Please try it with the above solution and let us know if you need any further assistance on this. 

Regards, 
Elakkiya 


Marked as answer

TO Tony May 6, 2021 01:21 PM UTC

Hi Elakkiya,
I started a new project to test your solution, but I think my problem is that I'm not including all the references and import statements. Please can you let me know what to inlcude in what files. I want to place the tree navigator on an ordinary windows form (ie not an sfForm) and am becoming bogged down with lots of error messages eg:
1. SkinManager.LoadAssembly(GetType(Syncfusion.WinForms.Themes.Office2019Theme).Assembly) - it can't find skinmanager and then it threw up an error with .Themes.
2. Next it didn't like: Dim treeNavigator As New TreeNavigator()
I'm guessing that I need to update Application.Designer.vb but this has become a mine field and now I'm completely confused.
I think what would help me immensely with this problem and probably pre-empt a lot of issues with adding future syncfusion controls is a step by step guide of where you put all of the environment initialisation code (themes, licensing, assembly information etc etc) and details of what imports statements are needs so that once this is completed as a first step to setting up a project I could then add syncfusion objects to my forms without throwing up a long list of errors!!
Do you have an idiots guide to configuring the environment please?
Many thanks,
tony





EM Elakkiya Muthukumarasamy Syncfusion Team May 7, 2021 11:26 AM UTC

Hi Tony, 
 
Thanks for your update. 
 
Skinmanager library provides support to set a theme for all Syncfusion controls in an entire application to maintain a common user interface appearance.You can refer the below documentation for further reference. 
 
 
You can refer the below help documentation link to use the TreeNavigator in your sample project. 
 
 
For further reference refer below knowledge base links also 
 
 
 
Regards, 
Elakkiya 



TO Tony May 7, 2021 07:02 PM UTC

Many thanks Elakkiya,
Kind regards,
Tony


VR Vijayalakshmi Roopkumar Syncfusion Team May 10, 2021 05:06 AM UTC

Hi Tony 
 
Thank you for your update. 
 
Please let us know if you need any further assistance on this. 
 
Regards, 
Vijayalakshmi VR 



TO Tony May 10, 2021 10:00 AM UTC

Hi Vijayalakshmi,
Will do - many thanks!
Tony :-)

Loader.
Up arrow icon