Re: Have a clicked button make itself invisible gives an HRESULT E_FAIL error.
Ok, good to know. I actually took a different approach:
public void HideButton(Button b, bool blnShouldShow)
{
if (blnShouldShow)
{
b.Opacity = 1;
b.IsEnabled = true;
}
else
{
b.Opacity = 0;
b.IsEnabled = false;
}
}
setting opactity is insufficient because you can still click a completely transparent button, so I set the Enable property as well.
Thanks
Tim Stall
http://timstall.dotnetdevelopersjournal.com