Hi,
There is a bug in ContextMenu api.
Case Description:
- Set page's SupportedOrientation as PortraitOrLandscape
- Create a Panaroma View and have PanaromaItem in it.
- Create a ListBox inside PanaromaItem and bind it to a string based ObservationCollection<T>
- Create the DataTemplate in ListBox, where ListBoxItem contains one TextBlock, which is bounded to collection's data items.
- Generate Hold Event of TextBlock (inside ListBoxItem).
- Create and set ContextMenu at RUNTIME on Hold Event of textBlock (inside ListBoxItem).
- Change Configuration Type to 'Release' from 'Debug'
- Run the application in DEVICE.
- On Hold Event in Landscape mode. NullReferenceException is caught.
Following is the stacktrace:
at Microsoft.Phone.Controls.ContextMenu.UpdateContextMenuPlacement()
at Microsoft.Phone.Controls.ContextMenu.OpenPopup(Point position)
at Microsoft.Phone.Controls.ContextMenu.OnOwnerHold(Object sender, GestureEventArgs e)
at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)