I'm putting together a small project where I'm displaying some records in DataGrid
a form designed in XAML
, but I can't find the property that allows me to do this job.
My code so far is as follows:
<DataGrid x:Name="grdUnidadesMedida" HorizontalAlignment="Stretch" Margin="10,40" VerticalAlignment="Stretch" Height="Auto" Width="Auto">
<DataGrid.Columns>
<DataGridTextColumn x:Name="_codigoUnidadMedida" Binding="{Binding UnidadCodigo}" Header="Código Unidad de Medida" />
<DataGridTextColumn x:Name="_descripcionUniddMedida" Binding="{Binding Descripcion}" Header="Descripción Unidad de Medida"/>
<DataGridTextColumn x:Name="_estadoUnidadMedida" Binding="{Binding Estado}" Header="Estado" />
</DataGridTextColumn>
</DataGrid.Columns>
</DataGrid>
The project is all done in C#, but I don't think it affects this part of the form design.
I didn't know if it was horizontal or vertical but the solution for both cases would be as follows: