I am new to WPF so after reading for a while I deduce that my problem needs to be handled with this pattern: DependencyProperty.
I want my toggleButton to have another boolean property.
My problem is where should I assign this property, and how? Inside the object that is bound to the toggleButton?
Let's say I have a class cell (which is bound to this button) that when clicked I want that from this point on, it would hold new face with trigger on.
My new property will be:
bool wasClick
Can someone explain to me how I should write it and tell me more about this new concept.
EDIT: the main topic is where should i define it ' so i want it asoocited to a button but where shold i write the all lets say i have a class whos binded to a button shoul i write
public static readonly DependencyProperty IsSpinningProperty = DependencyProperty.Register( ... "IsSpinning", typeof(Boolean),
in this class or should i write it in my view model ?? so where ? and how ?