Reputation: 3166
I'm somewhat new to WPF and VB.Net (but not new to programming in general) and I was wondering if someone could help me with an issue that I'm having.
Here's the problem:
I am creating a simple form using WPF in VB.Net and I have a button that I want to disable or enable based on an update to a DataGrid that is located in the form. When I first show the form the button is enabled by default and everything is fine. When the DataGrid changes I can disable the button programmatically by doing btnTest.IsEnabled=False
and the button grays out appropriately. However, when I subsequently call btnTest.IsEnabled=True
the button becomes enabled all except for the text that is displayed on the button; that text remains grayed out. I can switch back and forth between enabled and disabled several times and the behavior described still manifests. I'm not sure if I'm missing something but this seems to be a really simple problem to me and I've wasted a few hours on it already.
Does anyone know what's going on? I've already googled everything I know.
Thanks
Tom
Upvotes: 1
Views: 1151
Reputation: 3166
Just to update this: I actually found out that this was a bug in the BureauBlue theme that ships with .NET. If you have this problem tag me in a comment here and I can send you my modified BureauBlue.xaml file.
Upvotes: 1