routed-commands
Command's CanExecute method is called but not Execute method
I\'ve bound a command to a button on a Ribbon control. The CanExecute method on the button gets called as expected but clicking on the button doesn\'t cause the Execute method to be called. The CanExe[详细]
2023-04-12 13:48 分类:问答How to bind ApplicationCommands to a ViewModel?
I have successfully used a few custom commands using MVVM-开发者_JAVA百科Light, but I want my application to respond to the standard ApplicationCommands, not just at a Window level, but at a detailed[详细]
2023-04-10 03:34 分类:问答Listening to routed events / commands from a popup
I have a control that dynamically creates a popup. The popup contains controls that fire routed events / commands, which I want to react to in the original control. The original control is set as the[详细]
2023-04-06 10:34 分类:问答Should I check an ICommand's CanExecute method before calling Execute from procedural code?
When using ICommands in XAML, WPF uses the CanExecute method to enable or disable controlsassociated with the command. But what if I am calling Execute from procedural code? Should I first check CanEx[详细]
2023-03-25 17:37 分类:问答Cache CanExecute (or anything) in WPF?
The Cache object in System.Web is pretty freaking nice. I handle my CommandBinding.CanExecute sort of like this:[详细]
2023-03-25 04:05 分类:问答WPF VB.net - Can multiple CommandBindings be executed for the same command?
In WPF I\'m trying to use commands to set all the content in multiple textboxes at once. The following code is able to get a command on the toggle button to execute for which ever 开发者_StackOverflow[详细]
2023-03-22 22:50 分类:问答WPF: ApplicationCommands seem to ignore CommandTarget
I have a TextBox and a ListView in my window, and I\'d like to move the ListView\'s selection up and down while the TextBox has focus:[详细]
2023-03-21 12:42 分类:问答How is the RoutedCommand.Name property used?
The RoutedCommand class has a Name property that can be set in the contructor. MSDN has this to say about RoutedCommand.Name:[详细]
2023-03-20 05:23 分类:问答Can I Raise CanExecute on MediaCommands without using InvalidateRequerySuggested()?
I have some custom CommandBindings that determine the CanExecute status of various MediaCommands (Play, Pause, etc). I\'d like to trigger the CanExecute handler to be called at certain points. However[详细]
2023-03-09 16:37 分类:问答When to use events over commands in WPF?
Hi i have recently looked into WPF and started learning about Events and Commands. I typically use Commands on Button clicks which causes a method to Run in my \"view model\".[详细]
2023-03-08 00:24 分类:问答