Toggle Background and Border by IsMouseOver trigger
Hi,
I made a style with trigger to toggle background and border of ButtonAdv while MouseOver event.
<Style x:Key="HiddenIfDisabledButtonAdvStyle" TargetType="{x:Type sf:ButtonAdv}"> <Setter Property="BorderBrush" Value="Transparent" /> <Setter Property="Background" Value="Transparent" /> <Style.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter Property="BorderBrush" Value="{StaticResource MyRedBrush}" /> <Setter Property="Background" Value="White" /> </Trigger> </Style.Triggers> </Style>
The problem is, that in case of mouse over the border and background changes, but to other values than my settings (MyRedBrush and White).
Can you help me?
Regards
Harald
SIGN IN To post a reply.
7 Replies
KJ
Keerthana Jegannathan
Syncfusion Team
August 31, 2016 10:25 AM UTC
Hi Harald,
Thank you for contacting Syncfusion support.
We have prepared sample in which we have inherited the style of the ButtonAdv in App.Xaml file and modified the color of Button’s background and border on MouseOver as per your requirement. Please refer to the code sample.
Please let us know, whether it is helpful.
Regards,
Keerthana J
HB
Harald Betzler
August 31, 2016 04:16 PM UTC
Hi Keerthana,
thank you for the sample. It works.
In the meantime I've learned, that for many configurations I've to manipulate the corresponding ControlTemplate. Where can I find the ControlTemplate for all the controls (e.g. RibbonButton)?
Regards
Harald
KJ
Keerthana Jegannathan
Syncfusion Team
September 1, 2016 11:06 AM UTC
Hi Harald,
We have prepared sample with RibbonButton template. Please download the sample from the below location. Can you please list the control for which you require the control template? We will update you the template for that particular control.
Regards,
Keerthana J
HB
Harald Betzler
September 1, 2016 02:00 PM UTC
Hi Keerthana,
thanks for the sample.
Today I do not know what controls I will use tomorrow. But many configurations can't be done in XAML. Therefore I need the DataTemplates, which (I think) are not public available. That means every time, when I have to configure the data template of a (unused) control, I have to beg for the data template and wait (at least) one day. :-(
In my eyes much more properties should be configured in XAML or data templates should be public.
Regards
Harald
KJ
Keerthana Jegannathan
Syncfusion Team
September 2, 2016 09:03 AM UTC
Hi Harald,
You can fetch the template for our control using VS Blend and modify the styles based on your requirement.
Steps to get template from Visual Studio Blend
1) Open the Visual Studio 2015 Blend
2) Drag and drop the control into the designer
3) Right click on the Syncfusion control and select Edit template
4) Now select “Edit a Copy” to get the template of the control.
5) Assign name to the template, this name could be used as style key for the control.
6) Now you can use the template of the control.
Please let us know, whether it is helpful.
Regards,
Keerthana J
HB
Harald Betzler
September 2, 2016 01:16 PM UTC
Hi Keerthana,
that's ok. Thank you.
Regards
Harald
KJ
Keerthana Jegannathan
Syncfusion Team
September 5, 2016 03:42 AM UTC
Hi Harald,
Thank you for your update.
We are glad that we helped in achieving your requirement. Please let us know if you need further assistance.
Regards,
Keerthana J
SIGN IN To post a reply.
- 7 Replies
- 2 Participants
-
HB Harald Betzler
- Aug 30, 2016 10:59 AM UTC
- Sep 5, 2016 03:42 AM UTC