[RESOLVED] WPF DockPanel-VBForums
Results 1 to 2 of 2

Thread: [RESOLVED] WPF DockPanel

  1. #1

    Thread Starter
    Code Monkey wild_bill's Avatar
    Join Date
    Mar 2005
    Location
    Montana
    Posts
    2,901

    Resolved [RESOLVED] WPF DockPanel

    I'm very new to WPF programming, but I thought I would see if I could gain some functionality buy converting one of my old Win Forms. Right of the go I have a question. I have to treeview controls inside a dockpanel. I would like each to take up half the panel. I tried using Width="50%" like I would with a web app, but that didn't work. I could set them in the code behind, but it seems like there should be a way to specify the width of the treeview is half that of the parent dock panel in XAML.
    That is the very essence of human beings and our very unique capability to perform complex reasoning and actually use our perception to further our understanding of things. We like to solve problems. -Kleinma

    Does your code in post #46 look like my code in #45? No, it doesn't. Therefore, wrong is how it looks. - jmcilhinney

  2. #2

    Thread Starter
    Code Monkey wild_bill's Avatar
    Join Date
    Mar 2005
    Location
    Montana
    Posts
    2,901

    Re: [RESOLVED] WPF DockPanel

    This is what I ended up using.
    Code:
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
                <TreeView Name="TreeView1" Grid.Row="0" Grid.Column="0"  />
                <TreeView Name="TreeView2" Grid.Row="0" Grid.Column="1" />
        </Grid>
    Big thanks to this post: http://www.vbforums.com/archive/index.php/t-650070.html
    That is the very essence of human beings and our very unique capability to perform complex reasoning and actually use our perception to further our understanding of things. We like to solve problems. -Kleinma

    Does your code in post #46 look like my code in #45? No, it doesn't. Therefore, wrong is how it looks. - jmcilhinney

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.