TreeView style to support full-row select

WPF Studio, Themes, and Shared Library for WPF Forum

Posted 9 years ago by Eric P
Version: 15.1.0623

So we very much like the Actipro Styles that apply to native controls like a TreeView but the out-of-the-box style for a TreeView (and the Actipro style for a TreeView) does not support a full-row selection like the TreeView used in Visual Studio Solution Explorer. I understand how to create a TreeView style that supports a full-row selection but I am not sure how to base it on the Actipro Style for a TreeView. I am familar with the BasedOn attribute for a Style (which is also mentioned in this post The issue is that to support a full-row selection in a TreeView you have to modify the Template of the TreeViewItem.

<Style TargetType="{x:Type TreeViewItem}" BasedOn="{StaticResource {x:Static themes:SharedResourceKeys.TreeViewItemStyleKey}}">
  <Setter Property"Template">


Even if I base my style on the Actipro style for a TreeViewItem I am replacing your Template with mine and then I do not get all of the nice mouse over (hover) effects that I really like. I believe that the answer would be to first start with the Actipro Style for a TreeViewItem and then modify its Template to support a full-row selection. Right?



Comments (2)

Answer - Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA

Hi Eric,

That is correct, you'd want to clone our Style/Template for TreeViewItem and use that as a starting point so that you can modify it as needed, while retaining all of our theming that is built into our Template..

Actipro Software Support

Posted 9 years ago by Eric P

Great thanks! FYI having full-row selection for a TreeView when using the Metro themes would be a nice addition BTW. :-)

The latest build of this product (v24.1.2) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.