1
votes

How to resize listview when main window is resized?

Sorry for editing.

Want to set the minwidth for gridviewcolumn. So the listview column is set to the min width when page is resized. Is it possible?

Thanks SD

                    </GridViewColumn>
                    <GridViewColumn     Header="Item">


                    </GridViewColumn>
                    <GridViewColumn  Header="Price">

                    </GridViewColumn>
                    <GridViewColumn   Header="Total Price1">


                    </GridViewColumn>
                </GridView>
            </ListView.View>


        </ListView>
    </Grid>

2
I can't tell from your question - Are you trying to make the ListView itself resize, or are you trying to get the column widths to resize as well?Ryan Versaw
Is this different to your other 2 questions?Marc Gravell♦
Yes..All 3 questions are different.sDev

2 Answers

0
votes

Put it in a container control that resizes its content.

<Grid>
  <ListView ... />
</Grid>

or

<DockPanel>
  <ListView ... />
</DockPanel>

or others...

In WPF, containers control sizing and layout.

0
votes

have you set the HorizontalContentAlignment of your listbox?