Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > MaskedTextBox > Change caret brush in control radmaskedtextbox

Not answered Change caret brush in control radmaskedtextbox

Feed from this thread
  • Cristina avatar

    Posted on Apr 5, 2011 (permalink)

    Hi, wanted to know if you can change the color of the caret in a RadMaskedTextBox point. Today is black and I need to be white.
    Thanks

    Reply

  • Alex Fidanov Alex Fidanov admin's avatar

    Posted on Apr 7, 2011 (permalink)

    Hi Cristina,

    The RadMaskedTextBox uses a TextBox internally to display its text. The TextBox exposes a CaretBrush property which you can use to change the color of the caret. You can modify the default template of the control and set this property on the TextBox inside.

    Best wishes,
    Alex Fidanov
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items

    Reply

  • Cristina avatar

    Posted on Apr 7, 2011 (permalink)

    Thank you very much, I could change the color of caretBrush as you told me

    Reply

  • Robert avatar

    Posted on Oct 28, 2011 (permalink)

    Can you provide the code example for this? I'm having the same issue. I'm using a theme that causes the background to be almost black, and it's impossible to see the black caret within the RadMaskedTextBox. I simply want to make the CaretBrush white in the RadMaskedTextBox.

    Reply

  • Tina Stancheva Tina Stancheva admin's avatar

    Posted on Nov 2, 2011 (permalink)

    Hi Robert,

    I attached a sample project where I applied the Expression_Dark theme on the MaskedTextBox, however a custom style changes the default CaretBrush of the caret to White.

    Give it a try and let me know if it helps.

    Best wishes,
    Tina Stancheva
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

  • Robert avatar

    Posted on Nov 2, 2011 (permalink)

    That worked! Thanks! All I had to do was add this to my app.xaml:

    xmlns:telerikMask="clr-namespace:Telerik.Windows.Controls.MaskedTextBox;assembly=Telerik.Windows.Controls.Input"

    <Style TargetType="telerikMask:ExtendedTextBox">
    <Setter Property="CaretBrush" Value="White" />
    </Style>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > MaskedTextBox > Change caret brush in control radmaskedtextbox
Related resources for "Change caret brush in control radmaskedtextbox"

Silverlight MaskedTextBox Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]