❔ Change trigger behavior from code behind(!)
Hello again. I am still making a chess game using wpf&wcf. And the problem is that entire board is generated in code, so I can't do anything xaml related on the radio buttons I am using. The style of radio button is set by Style = FindResource(typeof(ToggleButton)) as Style; and I want to prevent selecting the cell from changing the background color (because it makes it impossible to see if the king is in check for example). So there should be a way to do this, but I couldnt find anything except xaml editing.
5 Replies
XAML is just code
what is the XAML you WOULD write for this?
setting background in trigger inside the xaml works, but when I do the handler it just doesnt override the default "animation" of checking the button
?
i just decided to bypass this by simply unchecking the cell after clicked and it works fine
no idea what was wrong with the code
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.