What is difference between “ * ” and “Auto” in Silverlight Grid Layout Definitions

后端 未结 3 1948
谎友^
谎友^ 2021-02-01 05:59

trying to understand the following:


    
        
        

        
3条回答
  •  野性不改
    2021-02-01 06:35

    This page (admittedly from Silverlight 2, but it's still valid) has some examples of using the grid with the following explanations:

    For every row in the Grid we have a RowDefinition element. All row definitions are enclosed in a Grid.RowDefinitions element. Our first two rows are 50 pixels high and Height of the third one is set to “*”. This indicates that the row will take the whole place in the Grid which is not taken by the other rows.

    and:

    Another option is to set the width and/or the height to “auto”. This way every column/row changes its size so as to match the width/height of the controls in it. For example:

提交回复
热议问题