Using Silverlight 4, VS 2010 and Blend 4
I have an Expander with a StackPanel and a ItemsControl where I get the collection of items I wanto to display.
<toolkit:Expander x:Name="ExpanderComentarios" Header="{Binding mySugest_Conteudo.Qt_CommentsSugestao_Info, Converter={StaticResource DescComentariosConverter}, ElementName=userControl, Mode=OneWay}" BorderThickness="0" Style="{StaticResource StyleExpanderBlue4}" d:LayoutOverrides="Height" Margin="3">
<StackPanel x:Name="stackMySugest" Margin="0,3,0,0">
<ItemsControl x:Name="itemsMySugest" ItemsSource="{Binding mySugest_Conteudo.ListMyComment_Info, ElementName=userControl}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<componente:myComent x:Name="mySugest_Comments" myComment="{Binding}"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</toolkit:Expander>
The item collection has a few items, more than would fit on the screen.
This Expander is inside a ScrollViewer.
The thing is that whenever I expand the Expander or update its content the ScrollViewer scrolls down to show the last item of the Expander.
How can I prevent that scroll from hapening?