Я ищу Как показать все мои Предметы, но для этого мне нужно сделать автоматическую Высоту Моего пользовательского контроля. Я желаю, чтобы значение было таким же:
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
.
.
.
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions >
<control:Plat Grid.Row="1"></control:Plat>
<control:Plat Grid.Row="2"></control:Plat>
<control:Plat Grid.Row="3"></control:Plat>
.
.
.
<control:Plat Grid.Row="n-2"></control:Plat>
<control:Plat Grid.Row="n-1"></control:Plat>
<control:Plat Grid.Row="n"></control:Plat>
</Grid>
С этим кодом:
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<DockPanel>
<ItemsControl x:Name="RepasMatin">
<ItemsControl.ItemTemplate>
<DataTemplate DataType="classes:C_T_plat">
<control:Plat ></control:Plat>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</DockPanel>
<materialDesign:PackIcon Kind="Build" Grid.Column="2" HorizontalAlignment="Right" Cursor="Hand"/>
С наилучшими пожеланиями