Disabling ApplicationBarIconButton in wp7

Total Post:154


 1426  View(s)
Rate this:

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
  1. Re: Disabling ApplicationBarIconButton in wp7

    Hi Manoj,

    Use like that

     ApplicationBarIconButton myAppIconButton =
     myAppIconButton.IsEnabled = false;
    And you will disable it.

      Modified On Apr-04-2018 02:24:44 AM


Please check, If you want to make this post sponsored

You are not a Sponsored Member. Click Here to Subscribe the Membership.