c# - Disabling Toggle Button Throws External Exception -


private async void addvoice_unchecked(object sender, routedeventargs e) {     addvoice.isenabled = false;      await task.delay(100);      addvoice.isenabled = true; } 

this simpler snippet actual code, found these 3 lines problem is.

it throws @ second line: await task.delay(100). exception external code , i'm not sure how catch it.

i found if disable button in non-async method (constructor example), doesn't throw. disabling in other async methods throw.

i'm able modify other controls' properties in method.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -