forum

Home / DeveloperSection / Forums / Disabling ApplicationBarIconButton in wp7

Disabling ApplicationBarIconButton in wp7

Manoj Bhatt 1650 29-Jan-2014

I've two applicationbariconbuttons, out of which one is to be enabled only if certain conditions are met. My Code in C#

if (//conditions)
  {
     ((ApplicationBarIconButton)DeleteButton).IsEnabled = false;
  }

But while excecution, i get the following error,

An unhandled exception of type 'System.Reflection.TargetInvocationException' occurred in System.Windows.ni.dll

Help me to solve this one.

Thanks in advance

c# c# 
Updated on 29-Jan-2014

Can you answer this question?


Answer

1 Answers

Liked By