Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5970515
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:23:06+00:00 2026-05-22T20:23:06+00:00

another day, another problem. Honestly, it would be rather boring if this ever stopped,

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T20:23:07+00:00Added an answer on May 22, 2026 at 8:23 pm

    You could try calling CommandManager.InvalidateRequerySuggested() from here.

    The CommandManager only pays attention
    to certain conditions in determining
    when the command target has changed,
    such as change in keyboard focus. In
    situations where the CommandManager
    does not sufficiently determine a
    change in conditions that cause a
    command to not be able to execute,
    InvalidateRequerySuggested can be
    called to force the CommandManager to
    raise the RequerySuggested event.

    also from the notes:

    It should be noted, that if you are
    using async calls, then the
    CommandManager.InvalidateRequerySuggested()
    should be called from the main thread,
    as any command listeners will be on
    the UI thread. (Use a Dispatcher and call CheckAccess())

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Good day everyone. This problem was part of another one which it as been
Another Day, another CoreData problem,...but hopefully the last one now. Ok here is a
Good day all, First of all, maybe i went about this the wrong way
I have another problem regarding Git. This time I thoroughly searched Google and Stack
Another easy one hopefully. Let's say I have a collection like this: List<DateTime> allDates;
In another Stack Overflow question Leon Timmermans asserted: I would advice you not to use
another day with Rails and today I want to use Ajax. linkt_remote_link for changing
Edit 1: Uninstalled & Reinstalled Edit 2: Same problem. Seriously? Yes. I am having
Another day, another Auth component headache. Everything was working fine for me until a
Another poster asked about preferred syntax for infinite loops . A follow-up question: Why

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.