WPF에서 ScrollViewer에 문제가 있습니다.WPF 관련 문제 ScrollViewer resize
ScrollViewer가 인계를 시작해야하는 지점까지 창 크기가 조정되면 창이 모눈의 크기를 조정하지 않고 스크롤 막대의 아래쪽이 화면 밖으로 사라집니다.
높이를 포함하는 격자의 높이에 바인딩을 시도했지만 행운이 없습니다.
<Grid x:Name="MainGrid" Width="Auto" Height ="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<StackPanel Height="134" Width="Auto" VerticalAlignment="Top" Background="Blue" HorizontalAlignment="Stretch">
<Label x:Name="ProjectNumberLabel" Content="ProjectNumber" HorizontalAlignment="Left" Height="45.5" VerticalAlignment="Top" Width="350" FontSize="32" Margin="10,0,0,0" Foreground="White"/>
<Label x:Name="ProjectNameLabel" Content="ProjectName" HorizontalAlignment="Stretch" Height="42" VerticalAlignment="Top" FontSize="24" Margin="10,0,0,0" Foreground="White" Width="auto"/>
<Label x:Name="SetLabel" Content="Set Id" HorizontalAlignment="Stretch" Width="Auto" Height="42" Margin="10,0,10,0" FontSize="24" VerticalAlignment="Top" Foreground="White" />
</StackPanel>
<ScrollViewer HorizontalAlignment="Stretch" Margin="0,140,0,0" Width="Auto" CanContentScroll="True" Height="{Binding ElementName=MainGrid, Path=ActualHeight }">
<StackPanel Name="ContainingPanel" VerticalAlignment="Top" HorizontalAlignment="Stretch" Width="Auto" Height="Auto">
<StackPanel HorizontalAlignment="Stretch" Width="Auto" Height="300"/>
<StackPanel HorizontalAlignment="Stretch" Height="38" VerticalAlignment="Bottom">
<CheckBox x:Name="ComplexDataCheckBox" Content="Show All Data" Click="ComplexDataCheckBox_Click" RenderTransformOrigin="1.751,0.547" Margin="0,4,0,0" Height="16" HorizontalAlignment="Right" Width="105" VerticalAlignment="Bottom">
<CheckBox.LayoutTransform>
<ScaleTransform ScaleX="2" ScaleY="2" />
</CheckBox.LayoutTransform>
</CheckBox>
</StackPanel>
<StackPanel HorizontalAlignment="Stretch">
<syncfusion:SfDataGrid HorizontalAlignment="Stretch" Width="Auto" VerticalAlignment="Stretch" x:Name="SpecimenGrid" AutoGenerateColumns="True" RowStyleSelector="{StaticResource styleselector}"/>
</StackPanel>
</StackPanel>
</ScrollViewer>
</Grid>
는, 외부 그리드는'DockPanel' 충분한 켜고 수분 것, 쓸모가 없다. 다른 컨트롤을 그리드에 배치하려면'ColumnDefinitions'와'RowDefinitions'을 정의해야합니다. 'ScrollViewer'에 대해서는 height를 정의하지 않고 stretch하기 위해'VerticalAlignement'를 정의합니다. 내용이 더 이상 적합하지 않으면 스크롤바가 나타납니다 – Sidewinder94