N
N
Nubbin2017-08-10 14:12:34
WPF
Nubbin, 2017-08-10 14:12:34

DataGrid auto-height?

All the example guys, how in DataGrid you can do this: If I opened the window in full screen so that the height of the tables also changed, here is my DataGrid

<DataGrid x:Name="orders_all"  DockPanel.Dock="Right" 
                               ItemsSource="{Binding OrdersCollection}" 
                              RowEditEnding="orders_all_RowEditEnding" 
                               PreviewKeyDown="orders_all_PreviewKeyDown" PreviewKeyUp="orders_all_PreviewKeyDown"
                               MouseDown="orders_all_MouseDown" Mouse.MouseUp="orders_all_MouseDown" 
                               Loaded="Orders_Loader" MinHeight="245" Width="auto" 
                               ScrollViewer.CanContentScroll="True" 
                               ScrollViewer.VerticalScrollBarVisibility="Auto"
                                ScrollViewer.HorizontalScrollBarVisibility="Auto" Background="White" SelectionChanged="orders_all_SelectionChanged" Margin="10 0 0 0">
                        <DataGrid.Resources>
                            <Style TargetType="{x:Type DataGridColumnHeader}">
                                <Setter Property="VerticalContentAlignment" Value="Stretch" />
                            </Style>
                        </DataGrid.Resources>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question