There is always one more blank line behind a grid in WPF

Source: Internet
Author: User

 <Grid>    <Dxg:gridcontrolName= "Griderrorsinfo"Autopopulatecolumns= "True"Showborder= "False"Showloadingpanel= "False"HorizontalAlignment= "Stretch"VerticalAlignment= "Stretch"allowcolumnmrufilterlist= "False"allowmrufilterlist= "False"Margin= "0,0,4,28"MouseDoubleClick= "Griderrorsinfo_mousedoubleclick">         <Dxg:GridControl.Columns>             <Dxg:gridcolumnName= "Num"FieldName= "Num"Header= "NUM"Width= "+"/>             <Dxg:gridcolumnName= "PageName"FieldName= "PageName"Header= "Name"Width= "Max"/>             <Dxg:gridcolumnName= "Errors"FieldName= "Errordetail"Width= "Auto"Header= "Megs"/>         </Dxg:GridControl.Columns>        <Dxg:GridControl.View>            <Dxg:tableviewName= "Errorviewlist"Autowidth= "True"Allowmovecolumntodroparea= "False"/>        </Dxg:GridControl.View>    </Dxg:gridcontrol></Grid>
<dxg:GridControl.View>  <dxg:tableview name= "errorviewlist"  autowidth= "True" Allowmovecolumntodroparea= "False"/></dxg:gridcontrol.view>
The most important of the above code is the above two sentences.
<DataGridAutoGenerateColumns= "False"Height= " the"HorizontalAlignment= "Left"Margin= "2,5,0,0"Name= "Datachartsingle"VerticalAlignment= "Top"Width= "225"isreadonly= "True">         <Datagrid.columns>             <DatagridtextcolumnHeader= "Varnumber"Binding="{Binding VarName}"Width= "The "Canusersort= "False"canuserresize= "True"/>                                                                                    <DatagridtextcolumnHeader= "Maxvar"Binding="{Binding Varmax}"Width= "$"Canusersort= "False"canuserresize= "True" />             <DatagridtextcolumnHeader= "Minvar"Binding="{Binding Varmin}"Width="*"Canusersort= "False"canuserresize= "True" />                                                                                </Datagrid.columns>                                                                   </DataGrid>

In the DataGrid is a good solution, just to the last column in the Width setting, set to Width= "*" The last column will be filled automatically.

There is always one more blank line behind a grid in WPF

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.