Совместное использование триггера и триггера событий в WPFC#

Место общения программистов C#
Гость
Совместное использование триггера и триггера событий в WPF

Сообщение Гость »


Я присваиваю кнопке эффект ColorAnimation в соответствии с темой, выбранной пользователем. Проблема в том, что здесь я не могу просто использовать DynamicResource, потому что ColorAnimation необходимо заморозить, чтобы использовать в раскадровках.
Поэтому я добавил свойство зависимости с именем

Код: Выделить всё

SelectedTheme
to the radio button.
As a result, when the mouse enters control and the

Код: Выделить всё

SelectedTheme
value is Light, the colors I used for the radio button in ColorAnimation should be active.
I used nested trigger and event trigger as below, but it didn't work. Is there any situation where I can combine these triggers?
Or can you offer an alternative solution for the dynamic resource situation in ColorAnimation?

Источник: https://stackoverflow.com/questions/781 ... her-in-wpf

Вернуться в «C#»