This question is locked. New answers and comments are not allowed.
Is it possible to trigger OnMouseOver style depending of another control OnMouseOver state?
Specifically I would like to trigger OnMouseOver style on a RadButton when user hovers a RadComboBox.
5 Answers, 1 is accepted
0
Hi Ivo,
I'm assuming that currently the RadButton you are mentioning is inside the ControlTemplate of the RadComboBox. On MouseOver of the RadComboBox you want to make sure that ToggleButton knows this and changes accordingly like it has being hovered directly. You can achieve this fairly easy with the use of DataTrigger (for example we'll change the Foreground of the Button):
Regards,
Evgenia
Telerik by Progress
I'm assuming that currently the RadButton you are mentioning is inside the ControlTemplate of the RadComboBox. On MouseOver of the RadComboBox you want to make sure that ToggleButton knows this and changes accordingly like it has being hovered directly. You can achieve this fairly easy with the use of DataTrigger (for example we'll change the Foreground of the Button):
<
Style.Triggers
>
<
DataTrigger
Binding
=
"{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type RadComboBox}}, Path=IsMouseOver}"
Value
=
"True"
>
<
Setter
Property
=
"Background" Value="Red" /
>
</
DataTrigger
>
</
Style.Triggers
>
Regards,
Evgenia
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0

Tim
Top achievements
Rank 1
answered on 13 Dec 2016, 07:15 AM
Hi Evgenia,
Thank you for you answer. What I actually would like is to trigger control's built-in OnMouseOver Style so the when I change the theme, OnMouseOver style is consistent. Not to change the Background to another color like in your example. Is that possible?
0
Hi Ivo,
We need more time to check your scenario. We will contact you again as soon as we have more information about your case.
Regards,
Dinko
Telerik by Progress
We need more time to check your scenario. We will contact you again as soon as we have more information about your case.
Regards,
Dinko
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Hi Ivo,
You might find attached a sample project that I believe does what you required. Some notes about it -- please add NoXAML binaries reference to the project to be able to run it as it is made to be used with our implicit styles theming mechanism. It will definwetely work on changing themes runtime as well. Give it a try and let us know how it works for you.
Regards,
Evgenia
Telerik by Progress
You might find attached a sample project that I believe does what you required. Some notes about it -- please add NoXAML binaries reference to the project to be able to run it as it is made to be used with our implicit styles theming mechanism. It will definwetely work on changing themes runtime as well. Give it a try and let us know how it works for you.
Regards,
Evgenia
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which
deliver the business app essential building blocks - a grid component,
data visualization (charts) and form elements.
0

Tim
Top achievements
Rank 1
answered on 06 Jan 2017, 02:07 PM
Hi Evgenia,
Your solution works perfectly even with the normal libs (currently we are using those).
Regards.