C
C#2y ago
Sergonizer

❔ 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
JakenVeina
JakenVeina2y ago
XAML is just code what is the XAML you WOULD write for this?
Sergonizer
SergonizerOP2y ago
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
JakenVeina
JakenVeina2y ago
?
Sergonizer
SergonizerOP2y ago
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
Accord
Accord2y ago
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.
Want results from more Discord servers?
Add your server