Changing the Look and Feel of the ToggleButton in the TreeView RRS feed

  • Question

  • Hi Everyone, I would just like to know how to change the look of the toggle button (collapsed)+ and (expanded)- in the TreeView. I know I will probably have to change the template of the TreeViewItem, but don't know how to or where to begin. Can someone please help? Thanks
    Thursday, October 22, 2009 7:03 AM


All replies

  • You need to change TreeViewItem control template.  For example, check this out: http://msdn.microsoft.com/en-us/library/ms788727.aspx

    • Proposed as answer by Ged21373 Monday, October 26, 2009 7:24 AM
    • Marked as answer by Linda Liu Thursday, October 29, 2009 7:45 AM
    Monday, October 26, 2009 6:54 AM
  • Hi IvanRSA,

    Since what you want is just to change the look and feel of the ToggleButton n the TreeView, you can only define a ControlTemplate of your own for the ToggleButton, rather than for the whole TreeViewItem.

    Hope this helps.
    If you have any question, please feel free to let me know.

    Linda Liu
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Thursday, October 29, 2009 7:48 AM