RadMaskedTextInput onmouse over border color

4 posts, 1 answers
  1. Mauricio
    Mauricio avatar
    2 posts
    Member since:
    May 2015

    Posted 08 Sep 2015 Link to this post

    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"/>​

  2. Evgenia
    Admin
    Evgenia avatar
    1406 posts

    Posted 10 Sep 2015 Link to this post

    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
  3. DevCraft banner
  4. Mauricio
    Mauricio avatar
    2 posts
    Member since:
    May 2015

    Posted 15 Sep 2015 in reply to Evgenia Link to this post

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

    Is there a way to just disable the effect?

    Thnk you.

  5. Answer
    Evgenia
    Admin
    Evgenia avatar
    1406 posts

    Posted 18 Sep 2015 Link to this post

    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
Back to Top