I added a new button ApplicationBarMenuwith an icon on the page in my wp7 project. when I try to start the page, I get:
Failed to set property 'Microsoft.Phone.Shell.ApplicationBarIconButton.Click. [Line: 56 Position: 124]
Which points to a new menu item button that I added (second, send_report_button):
<phone:PhoneApplicationPage.ApplicationBar>
<shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
<shell:ApplicationBarIconButton x:Name="take_photo_button" IconUri="/Images/appbar.feature.camera.rest.png" Text="Take photo" Click="TakePhotoClick" />
<shell:ApplicationBarIconButton x:Name="send_report_button" IconUri="/Images/mail.sent.png" Text="Send report" Click="SendReportClick" />
<shell:ApplicationBarIconButton x:Name="logout_button" IconUri="/Images/appbar.logout.rest.png" Text="Logout"/>
<shell:ApplicationBar.MenuItems>
</shell:ApplicationBar.MenuItems>
</shell:ApplicationBar>
</phone:PhoneApplicationPage.ApplicationBar>
I checked ten times that I have a method in .xaml.cs:
private void SendReportClick(object sender, RoutedEventArgs e)
But still VS does not seem to recognize it, otherwise something is wrong.
thank
source
share