another day, another problem. Honestly, it would be rather boring if this ever stopped, wouldn't it?
EDIT : Seems all of the background-information is obsolete. Here's the boiled down version: My Command class rigs up CanExecuteChanged with the CommandManagers RequerySuggested event (as described here : WPF Custom ICommand implementation and the CanExecuteChanged event).
public abstract class CommandBase : ICommand { public abstract void Execute(object parameter); public abstract bool CanExecute(object parameter); public event EventHandler CanExecuteChanged { add { CommandManager.RequerySuggested += value; } remove { CommandManager.RequerySuggested -= value; } } } In my case, the CommandManager fails to suggest a requery where it would be of some importance. Now I have to bypass this and force it to requery. Does anybody know how to do this?
Another Edit: I've tried really many things now (changing my command logic, removing control template and style), and still get stuck on this. I can't reproduce the problem in an isolated sandbox scenario, though. I really think I am suffering from a bug here, since the Button's behaviour is inconsistent with its looks, even if the Style is boiled down to the following :
<Style TargetType="{x:Type Button}" x:Key="CertificateActionButton"> <Setter Property="Background" Value="{DynamicResource CertificateActionButtonBackground}"/> <Setter Property="BorderThickness" Value="0"/> <Style.Triggers> <Trigger Property="IsEnabled" Value="False"> <Setter Property="Background" Value="LightGray"/> </Trigger> </Style.Triggers> </Style> When I unfocus and then focus the window again, Coherence is restored - the button the looks as inactive as it is.
Update : Since I haven't been able to reproduce this issue, i close this question. The only answer it has received was a good one, but after having edited the question so many times, q & a don't really seem related any more.