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.
notice how treeview isn't staying max size?? it's shrinking required size. horizontal alignment working if treeview still large.
if remove arrangeoverride, items visible, treeview shrinking.
Comments
Post a Comment