0
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;
}
}
這裏在條件我收到錯誤,如「沒有定義它」。請告訴我在Windows Phone 7中的圖釘點擊事件錯誤?
什麼是錯誤你越來越多了?它發生了什麼? –
contextMenu.DataContext = _viewModel.Pushpins.Where (c =>(c.Location == _ppmodel.Location))。FirstOrDefault(); in where條件。 – WP7
什麼是錯誤?消息和/或堆棧跟蹤? –