Reputation: 23
I'm trying to make a windows phone app so far so good, except one really annoying issue I'm having, i've been researching this for days and tried everything I can think of.
My layout is this: I have
I used this guide http://depblog.weblogs.us/2013/07/22/facebook-like-settings-pane-windows-phone/
there is a listview in both the middle grid and the left grid, the middle listview scrolls the left one does not. if I remove only the -480 margin from the left grid the left listview will scroll. so my problem is as soon as the listview is off the screen it stops scrolling even when called back to view
please help, thanks
this is a drawing of the grids I am describing https://i.sstatic.net/E5KZY.jpg
UPDATE**
if I make the margin of the left grid to 360 so it is over lapping the center grid the list scrolls when the view is on the center grid, but when I switch the view to the left grid it stops scrolling
Upvotes: 1
Views: 905
Reputation: 788
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid x:Name="MenuGrid" Grid.Column="0">
<Canvas x:Name="MainCanvas">
<Canvas.Resources>
<Storyboard x:Name="OpenAnimation">
<DoubleAnimation Duration="0:0:0.5" To="300"
Storyboard.TargetProperty="(Canvas.Left)"
Storyboard.TargetName="canvas"/>
</Storyboard>
<Storyboard x:Name="CloseAnimation">
<DoubleAnimation Duration="0:0:0.4" To="0"
Storyboard.TargetProperty="(Canvas.Left)"
Storyboard.TargetName="canvas"/>
</Storyboard>
</Canvas.Resources>
<Canvas x:Name="canvas">
<Grid Background="White"
Margin="0 0 0 30"
Height="800"
Canvas.Left="-300">
<ListView x:Name="TestListView"
Visibility="Visible"
SelectionMode="Single"
ItemTemplate="{StaticResource HomeListViewTemplate}"
ItemsSource="{Binding}"/>
</Grid>
</Canvas>
</Canvas>
</Grid>
</Grid>
Can you try this. The ListView normally when it is main screen it takes the height of its parent control like grid. But when its out of view it doesn't have a definite height. Controls like ScrollViewer,Listview will not scroll unless they have fixed height. So try to set height in XAML or in code.
Upvotes: 1