This is a migrated thread and some comments may be shown as answers.

RadMaskedTextInput onmouse over border color

3 Answers 116 Views
MaskedInput (Numeric, DateTime, Text, Currency)
This is a migrated thread and some comments may be shown as answers.
Mauricio
Top achievements
Rank 1
Mauricio asked on 08 Sep 2015, 04:31 PM

Hi,

I am trying to change the border color when mouse over a RadMaskedTextBox  but i am not able to do so, i tried to change the theme but it does not change anything here is my code:

 

<telerik:RadMaskedTextInput x:Name="mkdTxtTransNumber" Grid.Row="4" Grid.Column="3" Margin="0,-10,0,0" Mask="AAAAA-##-AAAAA" 
                                                            IsClearButtonVisible="False" Width="120" Height="25" Text="{Binding TransactionNumber}" SelectionOnFocus="SelectAll"
                                                            Visibility="Collapsed" IsValidationHintVisible="False" telerik:StyleManager.Theme="Vista"/>​

3 Answers, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 10 Sep 2015, 02:03 PM
Hello Mauricio,

The Border that you see on MouseOver is colored by the corresponding MouseOver VisualState inside the default ControlTemplate of the RadMaskedInputBaseStyle. As you might know we support several maskedinput controls described in this help topic and all of them inherit the mentioned RadMaskedInputBaseStyle when it comes to visual appearance. 

So what you need to do is modify the MouseOver Visual State of the RadMaskedInputBaseStyle so that you change the Border color with one you prefer. The default control template of the control can be extracted either manually (if you are using implicit styles theming mechanism and NoXAML binaries) or with the help of VisualStudio designer or Expression Blend. Both approaches are demonstrated here.

I see that you are new to the way we style our controls and for the purpose I highly recommend that you review our Styling and Appearance documentation section that will make you familiar with the styling mechanisms and theme specifics we use.

Let me know if you need any further assistance with customizing the control template.

Regards,
Evgenia
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Mauricio
Top achievements
Rank 1
answered on 16 Sep 2015, 03:34 AM

Can i get a quick example of how to do this?

Is there a way to just disable the effect?

Thnk you.

0
Accepted
Evgenia
Telerik team
answered on 18 Sep 2015, 08:26 AM
Hello Mauricio,

You may find attached a sample that demonstrates how to remove the Border on MouseOver (please see the commented line in XAML under MouseOver VisualState). Whether you want to remove the Border on Selected state as well you should comment or delete the same code line there.

A note about the attached project: You need to add reference to binaries from Binaries.NoXAML folder under the local installation path of our controls. The reason for this is that the sample uses implicit styles theming mechanism as we highly reccomend it to our clients. To see what it is about and what are its benefits compared to StyleManager please read this help article.

Regards,
Evgenia
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
MaskedInput (Numeric, DateTime, Text, Currency)
Asked by
Mauricio
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Mauricio
Top achievements
Rank 1
Share this question
or