WP8 Error – Cannot clear the icon while in a list Parameter name: value


This content was proof-read by Grammarly. You can Try Grammary for FREE

When using the ApplicationBar in the Windows Phone Application and dynamically setting the IconButtons from code behind , I encounter this error .

Cannot clear the icon while in a list Parameter name: value

The cause of the error and the fix is pretty straight forward .


Are you a .NET Developer planning to integrate GraphQL for .NET in your Application? Check out this book

I was setting the IconUri of the ApplicationBarIcon button programmatically and the value of the IconUri was not set for one of the IconButtons.

WP8 Error - Cannot clear the icon while in a list Parameter name: value

Setting the right IconUri resolved the issue.

%d bloggers like this: