我尝试为我的网格添加一个水龙头处理程序:
<Grid x:Name="LayoutRoot" Background="#FF1F1F1F" Tap="OnTap">........</Grid>
InitializeComponent();
我得到了这个:
A first chance exception of type 'System.Windows.Markup.XamlParseException' occurred in System.Windows.ni.dll
Failed to assign to property 'System.Windows.UIElement.Tap'. [Line: 14 Position: 58]
{System.Windows.Markup.XamlParseException: Failed to assign to property 'System.Windows.UIElement.Tap'. [Line: 14 Position: 58]
at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
at *.NowPlayingPageControl.InitializeComponent()
at *.NowPlayingPageControl..ctor()}