treeview size in wpf

Posted by AComputert on Stack Overflow See other posts from Stack Overflow or by AComputert
Published on 2012-06-16T08:55:08Z Indexed on 2012/06/16 9:16 UTC
Read the original article Hit count: 193

Filed under:
|

please let me know how can I re size height of tree view control when screen resolution is changed? please see this code:

 <TreeView  Name="treeView1" Height="150" VerticalAlignment="Top">
                <TreeViewItem Header="Root" IsExpanded="True">
                        <TreeViewItem Header="Item 1"></TreeViewItem>
                        <TreeViewItem Header="Item 2"></TreeViewItem>
                        <TreeViewItem Header="Item 3"></TreeViewItem>
                        <TreeViewItem Header="Item 4"></TreeViewItem>
                        <TreeViewItem Header="Item 5"></TreeViewItem>
                        <TreeViewItem Header="Item 6"></TreeViewItem>
                        <TreeViewItem Header="Item 7"></TreeViewItem>
                        <TreeViewItem Header="Item 8"></TreeViewItem>
                        <TreeViewItem Header="Item 9"></TreeViewItem>
                        <TreeViewItem Header="Item 10"></TreeViewItem>
                        <TreeViewItem Header="Item 11"></TreeViewItem>
                        <TreeViewItem Header="Item 12"></TreeViewItem>
                        <TreeViewItem Header="Item 13"></TreeViewItem>
                        <TreeViewItem Header="Item 14"></TreeViewItem>
                        <TreeViewItem Header="Item 15"></TreeViewItem>
                        <TreeViewItem Header="Item 16"></TreeViewItem>
                        <TreeViewItem Header="Item 17"></TreeViewItem>
                        <TreeViewItem Header="Item 18"></TreeViewItem>
                        <TreeViewItem Header="Item 19"></TreeViewItem>
                        <TreeViewItem Header="Item 20"></TreeViewItem>
                        <TreeViewItem Header="Item 21"></TreeViewItem>
                        <TreeViewItem Header="Item 22"></TreeViewItem>
                        <TreeViewItem Header="Item 23"></TreeViewItem>
                        <TreeViewItem Header="Item 24"></TreeViewItem>
                        <TreeViewItem Header="Item 24"></TreeViewItem>
                </TreeViewItem>
        </TreeView>

in some screen resolutions i can see all nodse and in some resolutions i see a scroll bar. I want to see all nodes without scroll bar.

© Stack Overflow or respective owner

Related posts about c#

Related posts about wpf