I have a button with a background color, and I want to send this background color as a command parameter to command binding! How can i do this?
<Button Background="Red" Command="{Binding ChangeColorCommand}" CommandParameter="{Binding this.Background}" />
I think you should use a RelativeSource in a binding ...
<Button Background="Red" Command="{Binding ChangeColorCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Background}"/>
Source: https://habr.com/ru/post/1735582/More articles:Adding a CSV file as a resource file and accessing it in code - c #Application Development and Number of Users - design-patternsWhat needs to be done to have the value "Value" in the enumeration? - scalaRedirecting asp.net to reach maximum connections / sessions - redirectHow can I write simulations in Erlang? - listкак я могу сделать предложение о новой функции в python - pythonИспользование QCoreApplication:: setEventFilter() в qt - qtMac style menus on Windows on a large scale - user-interfaceCrop string using reqex match - regexcreate your own LAMP distribution, for example XAMPP - cAll Articles