We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Toggle Background and Border by IsMouseOver trigger

Thread ID:

Created:

Updated:

Platform:

Replies:

125637 Aug 30,2016 10:59 AM UTC Sep 5,2016 03:42 AM UTC WPF 7
loading
Tags: ButtonAdv
Harald Betzler
Asked On August 30, 2016 10:59 AM UTC

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







Keerthana Jegannathan [Syncfusion]
Replied On 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   


Harald Betzler
Replied On 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

Keerthana Jegannathan [Syncfusion]
Replied On 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   
 


Harald Betzler
Replied On 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



Keerthana Jegannathan [Syncfusion]
Replied On 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 


Harald Betzler
Replied On September 2, 2016 01:16 PM UTC

Hi Keerthana,

that's ok. Thank you.

Regards
Harald

Keerthana Jegannathan [Syncfusion]
Replied On 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 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;