Nota
L-aċċess għal din il-paġna jeħtieġ l-awtorizzazzjoni. Tista’ tipprova tidħol jew tibdel id-direttorji.
L-aċċess għal din il-paġna jeħtieġ l-awtorizzazzjoni. Tista’ tipprova tibdel id-direttorji.
Starting with .NET 10, WPF applications fail to build if <Grid.ColumnDefinitions> or <Grid.RowDefinitions> are declared but left empty in XAML. This results in error MC3063, which indicates that the property doesn't have a value.
Version introduced
.NET 10
Previous behavior
Previously, WPF applications with empty <Grid.ColumnDefinitions> or <Grid.RowDefinitions> compiled successfully, even though the layout definitions were incomplete. The layout defaulted to a single row and column, placing all child elements in that single cell unless otherwise specified.
Example that previously compiled:
<Grid>
<Grid.ColumnDefinitions>
</Grid.ColumnDefinitions>
</Grid>
New behavior
Starting in .NET 10, the same code now fails to compile with the following error:
error MC3063: Property 'ColumnDefinitions' does not have a value.
This occurs when <Grid.ColumnDefinitions> or <Grid.RowDefinitions> elements are declared but contain no child <ColumnDefinition /> or <RowDefinition /> elements.
Type of breaking change
This change can affect source compatibility.
Reason for change
This change is a direct consequence of implementing Grid XAML Shorthand Syntax support.
Recommended action
Ensure that all <Grid.ColumnDefinitions> and <Grid.RowDefinitions> contains at least one valid or element.
Corrected example:
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
</Grid.ColumnDefinitions>
</Grid>
Affected APIs
None.