TreeNavigator Control with Icons

Hello,


I am trying to figure out the best way to create a vertical navigation menu with icons in Winforms. I have been working with the TreeNavigator control but it does not allow for icons on the TreeMenu items that I can see. 


Is there a way to add icons to the left side of the TreeMenu item text or is there a better control for achieving this functionality?




Attachment: Screenshot_20241208_134039_4bc75371.zip

6 Replies

BS Bhaskar Suresh Syncfusion Team December 9, 2024 01:16 PM UTC

Hi Chris Norskov,


Please refer to the below KB link on how to add images for the TreeMenuItems.

How to display image on TreeMenuItem in WinForms TreeNavigator?


You can also use NavigationDrawer control for your requirement of vertical navigation menu which supports built-in image support.
Getting Started with Windows Forms Navigation Drawer | Syncfusion


Please refer to these links and let us know if you have any concerns. 


Regards,

Bhaskar Suresh



CN Chris Norskov December 9, 2024 11:36 PM UTC

Hi Bhaskar,


Thank you for that. How can I display the image on the left side before the TreeMenuItem1,2,3,4,5 etc?



BS Bhaskar Suresh Syncfusion Team December 10, 2024 01:59 PM UTC

Hi Chris Norskov,


We have modified the sample to place the icon at the left of the TreeMenuItem by adjusting the properties of the DrawImage and setting the TextAlign property of the TreeMenuItem as Centre. Please refer to the attached sample and let us know your concerns.


Regards,

Bhaskar Suresh


Attachment: TreeMenu_Image_d0c43936.zip


CN Chris Norskov December 10, 2024 11:47 PM UTC

Hi Bhaskar,


Almost. How can I align the text so that it is to the right of the image? The idea in mind is the images will be menu icons with the text to the right....    basically like the attached screenshot where there's the icon, a little space, then the text. 



Attachment: Screenshot_20241210_184336_c07667aa.zip



BS Bhaskar Suresh Syncfusion Team December 14, 2024 04:56 AM UTC

Hi Chris Norskov,


Currently, there is no direct support to align the image before the text in TreeMenuItem. Hence, we have analyzed your requirement for “Provide support to add icon in the TreeMenuItem for the TreeNavigator control” and logged a feature request for the same. We will implement this feature in any of our upcoming releases.


At the planning stage for every release cycle, we review all open features and identify features for implementation based on specific parameters including product vision, technological feasibility, and customer interest. We will let you know when this feature is implemented. We appreciate your patience until then.


Thank you for requesting this feature and helping us define it. We are always trying to make our products better and feature requests like yours are a key part of our product growth efforts.


Feedback link: Provide support to add icon in the TreeMenuItem for the TreeNavigator control in WinForms | Feedback Portal


If you have any more specifications/suggestions for the feature request, you can add them as a comment in the portal and cast your vote to make it count.


Regards,

Bhaskar Suresh



BS Bhaskar Suresh Syncfusion Team December 14, 2024 05:52 AM UTC

Hi Chris Norskov,


Please ignore the previous feature request update. We have prepared a workaround to adjust the Text and Image inside the TreeMenuItem to meet your requirements. Please refer to the attached sample and let us know your concerns.


Regards,

Bhaskar Suresh


Attachment: TreeMenu_Image_84ebd537.zip

Loader.
Up arrow icon