c# - WPF TreeView Arrange Max Size -


i have treeview inside of canvas. when treeviewitem collapsed, treeview shrinks. can explicitly set height , width, may vary number of items change. want treeview big possible. in other words, want treeview size if every treeviewitem expanded.

here attempted when extending treeview, doesn't quite work.

protected override size arrangeoverride(size arrangebounds)     {         if (this.actualheight > arrangebounds.height)         {             arrangebounds.height = this.actualheight;         }         if (this.actualwidth > arrangebounds.width)         {             arrangebounds.width = this.actualwidth;         }         return base.arrangeoverride(arrangebounds);     } 

edit:

i need treeview in canvas can pan , zoom around properly.

here couple screen shots.

enter image description here

notice how treeview isn't staying max size?? it's shrinking required size. horizontal alignment working if treeview still large. enter image description here

if remove arrangeoverride, items visible, treeview shrinking. enter image description here


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -