commandparameter

Need additional help with binding multiple CommandParameters using MultiBinding

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...

How to send a property of the current element as as a command parameter in WPF?

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}" /> ...

WPF Commands firing via Keyboard shortcuts don't set the Command Parameter

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 ...

WPF: Menu Items only bind command parameters once.

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...

WPF CommandParameter binding not updating

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...

passing the current Window as a CommandParameter

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?-" /> ...