I need to have a command handler for a ToggleButton that can take multiple parameters, namely the IsChecked property of said ToggleButton, along with a constant value, which could be a string, byte, int... doesn't matter.
I found this great question on SO and followed the answer's link and read up on MultiBinding and IMultiValueConverte...
I have a button with a Background color, and I want to send this Background color as the Command Parameter to the Command Binding! How can I do that?
<Button Background="Red" Command="{Binding ChangeColorCommand}" CommandParameter="{Binding this.Background}" />
...
I have a command binding on the main form of my application. It is used to open details of the item that i am viewing. It has an associated keyboard shortcut.
When i use the command in sub-forms i pass the object i want to open details for as a CommandParameter. This works if i attach the command to a button or a context menu, as i can ...
Ive noticed this a couple of times when using menus with commands, they are not very dynamic, check this out. I am creating a menu from a collection of colours, I use it to colour a column in a datagrid. Anyway when i first bring up the menu (its a context menu) the command parameter binding happens and it binds to the column that the co...
Hi All,
I am trying to use Command and CommandParameter binding with Buttons in a WPF application. I have this exact same code working just fine in Silverlight so I am wondering what I have done wrong!
I have a combo box and a button, where the command parameter is bound to the combobox SelectedItem:
<Window x:Class="WPFCommandBinding...
Hi there
how can I pass the window I am currently on as a parameter to a command?
I like to do this in XAML-markup:
<Button Command="CommandGetsCalled" CommandParameter="-this?-" />
...