0
 <Grid Height="525" MouseLeftButtonUp="ShowTextTrainerNote" Margin="20,0,30,0">
     <Grid.RowDefinitions>
         <RowDefinition Height="Auto"/>
         <RowDefinition Height="*"/>
     </Grid.RowDefinitions>
     <ListView ScrollViewer.VerticalScrollBarVisibility="Auto" 
               ScrollViewer.HorizontalScrollBarVisibility="Disabled"
               Grid.Row="0"
               ItemsSource="{Binding PlayerTrainerNote}"
               Width="516" x:Name="trainerNoteListView"
               ItemContainerStyle="{DynamicResource TrainerNoteListView}">
     </ListView>
     <DockPanel Visibility="Collapsed" 
                x:Name="dock" Background="White"
                Grid.Row="1" LastChildFill="True">
        <TextBox  BorderBrush="{x:Null}" TextWrapping="Wrap"  
                  x:Name="AddNotesTextBox" 
                  ScrollViewer.VerticalScrollBarVisibility="Auto"
                  Width="516" KeyUp="SaveTrainerNote"/>
     </DockPanel>
 </Grid>

I want the listview height to be auto, but as soon as I populate with some data , the listview height is set to 525. I want to to be auto. How can I achieve this

4

0 に答える 0