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
Post a Comment