对于我的生活,我无法弄清楚为什么我的ListView不会垂直滚动。如果我想要水平滚动这是我不想要的东西它完美地工作。无论如何,有什么建议吗?!
是的,我确实清理了互联网......没有什么可悲的。
<Grid Background="#FF6A6A6A">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="130*"/>
</Grid.ColumnDefinitions>
<Grid HorizontalAlignment="Left" Height="489" Margin="3,10,0,0" VerticalAlignment="Top" Width="897" Background="White" Grid.Column="1">
<Grid HorizontalAlignment="Left" Height="43" Margin="10,0,0,0" VerticalAlignment="Top" Width="877">
<TextBlock x:Name="Job" HorizontalAlignment="Left" Margin="10,10,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Height="33" Width="147">
<Run Text="Job = "></Run>
<Run Text="{Binding Path= JobNum, UpdateSourceTrigger=PropertyChanged}"/>
</TextBlock>
<TextBlock x:Name="Style" HorizontalAlignment="Left" Margin="162,10,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Height="33" Width="185">
<Run Text="Style = "></Run>
<Run Text="{Binding Path= Style, UpdateSourceTrigger=PropertyChanged}"></Run>
</TextBlock>
<TextBlock x:Name="Due" HorizontalAlignment="Left" Margin="352,10,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Height="33" Width="186">
<Run Text="Due = "></Run>
<Run Text="{Binding Path= Date, UpdateSourceTrigger=PropertyChanged}"></Run>
</TextBlock>
<TextBlock x:Name="Core" HorizontalAlignment="Left" Margin="543,10,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Height="33" Width="144">
<Run Text="Core = "></Run>
<Run Text="{Binding Path= Core, UpdateSourceTrigger=PropertyChanged}"></Run>
</TextBlock>
<TextBlock x:Name="Tank" HorizontalAlignment="Left" Margin="692,10,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Height="33" Width="174">
<Run Text="Tank = "></Run>
<Run Text="{Binding Path= Tank, UpdateSourceTrigger=PropertyChanged}"></Run>
</TextBlock>
</Grid>
<Grid>
<ListView ItemsSource="{Binding BindCollection}" VerticalContentAlignment="Stretch" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible" Height="120" Margin="24,10,132,155" Visibility="Visible" RenderTransformOrigin="0.5,0.5" >
<ListView.ItemTemplate>
<DataTemplate>
<Grid VerticalAlignment="Top" Height="auto" Margin="10,0,0,0">
<TextBlock Text="{Binding Collection}" />
</Grid>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
</Grid>
<!--<TextBox x:Name="DataTextBox" HorizontalAlignment="Left" IsReadOnly="True" Height="437" Margin="10,43,0,9" TextWrapping="Wrap" Text="{Binding Path=ReportText, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" Width="877" FontSize="14" TextChanged="DataTextBox_TextChanged" Visibility="Hidden"/>-->
<Button x:Name="Close" Content="Close" Grid.Column="1" HorizontalAlignment="Left" Margin="334,544,0,0" VerticalAlignment="Top" Width="99" Height="33" Click="Button_Click_1"/>
<Button x:Name="Print" Content="Print" Grid.Column="1" HorizontalAlignment="Left" Margin="458,544,0,0" VerticalAlignment="Top" Width="99" Height="33" Click="Button_Click"/>
<GroupBox Grid.Column="1" Header="Print" HorizontalAlignment="Left" Margin="579,523,0,0" VerticalAlignment="Top" Height="73" Width="129" Foreground="White">
<StackPanel>
<RadioButton x:Name="Portrait" IsChecked="True" Foreground="White">Portrait</RadioButton>
<RadioButton x:Name="Landscape" Foreground="White">Landscape</RadioButton>
</StackPanel>
</GroupBox>
</Grid>