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

google app engine - 403 Forbidden POST - Flask WTForms -

Android layout hidden on keyboard show -

Parse xml element into list in Python -