I am writing a WP7 app.
It has a panorama control as a root element. One of the panoramas' items has a LongListSelector to di开发者_高级运维splay a list of AudioRecords.
I am currently trying to add a ContextMenu functionality to the list items. I want the context menu to appear on tap of a list item.
Here is what I get:
Problem 1: Apparently, whenever the IsZoomEnabled on ContextMenu, the moment the Context Menu becomes visible, it creates a cropped popup with the same look as the invoker element and places it over with the offset. My problem is that the original image doesn't get hidden. Also, this popup is not transparent, so it overlaps my group header. I want to still have zoom feature, just have it behave as it does in other apps. What could be the cause of such problem?
Problem 2: A context Menu itself appears all the way to the bottom. I need it to appears close to the invoking item, as it does in the People hub for example.
Any idea on how to solve these two problems? Thank you in advance.
P.S. just in case, the markup for the item is:
<StackPanel Utilities:TiltEffect.IsTiltEnabled="True">
<toolkit:GestureService.GestureListener>
<toolkit:GestureListener Tap="GestureListener_Tap" />
</toolkit:GestureService.GestureListener>
<toolkit:ContextMenuService.ContextMenu>
<toolkit:ContextMenu>
<toolkit:MenuItem Header="item1" />
<toolkit:MenuItem Header="item2" />
<toolkit:MenuItem Header="item3" />
</toolkit:ContextMenu>
</toolkit:ContextMenuService.ContextMenu>
<TextBlock Text="{Binding ThoughtName}" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}" Margin="9,0,12,0" />
<StackPanel Orientation="Horizontal">
<TextBlock Text="Width:" TextWrapping="Wrap" Margin="12,-6,0,0" Style="{StaticResource PhoneTextSubtleStyle}"/>
<TextBlock Text="{Binding RecordLengthText}" TextWrapping="Wrap" Margin="3,-6,12,0" Style="{StaticResource PhoneTextSubtleStyle}"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,6,0,0">
<TextBlock Text="Caught on:" TextWrapping="Wrap" Margin="12,-6,0,0" Style="{StaticResource PhoneTextSubtleStyle}"/>
<TextBlock Text="{Binding DateRecordedText}" TextWrapping="Wrap" Margin="3,-6,12,0" Style="{StaticResource PhoneTextSubtleStyle}"/>
</StackPanel>
</StackPanel>
I met the same Problem 1. But it has already been fixed in the latest windows phone toolkit August release (btw this is for Windows phone Mango). You can download and use the latest one to see if the problem get fixed.
And for Problem 2, I'm afraid I have no idea yet.
精彩评论