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 3211026
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T14:39:31+00:00 2026-05-17T14:39:31+00:00

I have a button on a toolbar that has its command set to MyControl.Print

  • 0

I have a button on a toolbar that has its command set to “MyControl.Print” (for example).
In the control the command is added to the command bindings including both the Execute and CanExecute.

The control is within a window with other controls docked appropriately.
I am finding that for the Print button to be enabled I have to “select” MyControl first which does not provide a good user experience and indeed causes various “bugs” being raised and lots of confusion.

Is there a way that I can ensure that the button is enabled whether or not the control has been “selected”?

  • 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-17T14:39:31+00:00Added an answer on May 17, 2026 at 2:39 pm

    Since the CanExecute doesn’t fire, I think you might be looking at the major downside to RoutedCommands – the way they tunnel and bubble can leave a highly composed interface unable to have commands arrive anywhere useful. For this reason we ended up moving to DelegateCommands from (I think) the Microsoft CAG. Not any of the other stuff, just the commands. Works a lot better, and isn’t tied in to the interface so tightly.

    Oh, the other response raises a good point. I assumed you meant that to ever print, your MyControl needed to have keyboard focus. Is it only the first time and after that it works?

    I recommend http://msdn.microsoft.com/en-us/library/ff921126(PandP.20).aspx as a pretty good starting point. You don’t have to worry too much about the IActiveAware up front, since you’re hoping for this command to be available all the time (or at least let its availablity be determined by CanExecute).

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

Sidebar

Related Questions

I want to have a button on my toolbar that has a little down
I have a button that I am using on a toolbar that has a
I have a UIBarButtonItem that has a UITextField as its customView. The toolbar contains
I have code that works great for adding a button to the toolbar: NSArray*
hi i have property named. public bool ShowLabels{get; set;} and one toolbar menu button
I have a UINavigationController. In its toolbar is a segmented control with two buttons.
I have a jQuery UI Button that I'm placing in a jqGrid toolbar but
I have a homemade toolbar control that is used in several places, both in
I have an App that has a toolbar at the bottom of the screen
I have a toolbar that has the typical buttons: new, save, save as, etc.

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.