private void Pushpin_Tap(object sender,
System.Windows.Input.GestureEventArgs e)
{
var _ppmodel = sender as Pushpin;
ContextMenu contextMenu =
ContextMenuService.GetContextMenu(_ppmodel);
contextMenu.DataContext = _viewModel.Pushpins.Where
(c => (c.Location
== _ppmodel.Location)).FirstOrDefault();
if (contextMenu.Parent == null)
{
contextMenu.IsOpen = true;
}
}
这里的情况我得到的错误就像“没有定义”。请告诉我
答案 0 :(得分:2)
确保文件中包含正确的using语句
using System.Linq;