1

I'm currently designing a menu panel with multiple templates using the WinRT-WAML-Toolkit. When I click on the content of a TreeViewItem, the element have the focus and the visual state "Selected" is active.

The problem is that the TreeViewItem's click event only works on the text portion and not the whole TreeViewItemContainer. So, I would like to select an element of the TreeView when I click anywhere on the row.

Is there anyway I can capture the event when it bubble up or tunnel down so the "Selected" state is set?

enter image description here

I have made the sample of my tree view open source : https://github.com/naster01/UWP-Controls-Samples/tree/master/Samples/TreeView_MenuDesign

Adam Paquette
  • 1,243
  • 1
  • 14
  • 28
  • 1
    This is probably very similar to `ListView` items. You need to set horizontal alignment for the corresponding container to stretch. Details [here](http://stackoverflow.com/questions/15067309/listviewitem-wont-stretch-to-the-width-of-a-listview). – akshay2000 Apr 17 '16 at 17:22

0 Answers0