Use a CompositeCollection binding the original collection in code is a bit difficult, see the example I give in this answer for some more detail, just put the CollectionContainer on top and a TreeViewItem including a Button at the bottom.
Use a CompositeCollection, binding the original collection in code is a bit difficult, see the example I give in this answer for some more detail, just put the CollectionContainer on top and a TreeViewItem including a Button at the bottom.
Thanks for that, I've done as you suggested and my tree view is rendering fine still but the tree view item containing the button does not appear. Any ideas? Thanks – Paulie Waulie May 6 at 9:35 No worries, I got it, I forgot to change my ItemsSource on the TreeView to the CompositeCollection.
Working now, nice solution and quick response, much appreciated :) – Paulie Waulie May 6 at 9:42 Glad that worked for you :) – H.B. May 6 at 9:48.
You can extract the default template for TreeView and alter it. Extraction is easily done in VS2010 or Blend. I've extracted it and added a button at the bottom.
I also added the StackPanel it is in. My button fgbhbgfdshgsfde fgbhbgfdshgsfde fgbhbgfdshgsfde fgbhbgfdshgsfde fgbhbgfdshgsfde fgbhbgfdshgsfde fgbhbgfdshgsfde fgbhbgfdshgsfde fgbhbgfdshgsfde fgbhbgfdshgsfde fgbhbgfdshgsfde fgbhbgfdshgsfde fgbhbgfdshgsfde.
This is probably going to seem like a daft question but please bear with me as I am very new to WPF, UI is sadly not my main area of skills and so I'm struggling to get my head around the concepts of WPF. I have a user control which contains a dock panel which then contains a tree view, the tree view is being bound using a Hierarchical Data Template which is working great, all the items and sub controls are being bound and I'm pleased with the rough layout result. However I wanted to add a button under the last bound tree view item.
At the moment I have a Grid inside the dock panel which has two rows, one for the tree view and one for the button but obviously the button is not part of the tree view, I want it to be within the scrolling area of the tree view so it appears as part of it and only appearing after the final item. Oh and before you ask, yes I am basically ripping the SharePoint Workflow designer, this is for an internal tool and for some reason I'm required to write a lightweight workflow engine which is done and a designer for it in WPF that looks very similar to the SP one. I don't make business decisions, just a code monkey ;) .
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.