wpftoolkit icon indicating copy to clipboard operation
wpftoolkit copied to clipboard

Changing Caret Color for Controls

Open Kuumba123 opened this issue 3 years ago • 5 comments

is there really no way to change the Caret Color ? I mainly wanna change the Caret Color for the IntegerUpDown and the ColorCanvas

Kuumba123 avatar Jul 16 '22 13:07 Kuumba123

Hi,

Thank you for reporting this. We will look to add a property to modify the CaretBrush to the Toolkit controls, so users won't have to redefine templates.

XceedBoucherS avatar Aug 10 '22 15:08 XceedBoucherS

thank you; many of my WPF apps take a more dark themed approach so you can't see the caret at all .

Kuumba123 avatar Aug 10 '22 22:08 Kuumba123

+1. Would also like to see this.

dkschruteBeets avatar Jan 16 '23 04:01 dkschruteBeets

is there any temporary work around? (preferably something in C# code)

Kuumba123 avatar Mar 26 '23 01:03 Kuumba123

Hi, Yes, here's a workaround for NumericUpDown controls, until a fix is applied: Create your own IntegerUpDown (or any other NumericUpDown control) and modify the inner TextBox's CaretBrush: `public class MyIntegerUpDown : IntegerUpDown { public override void OnApplyTemplate() { base.OnApplyTemplate();

  this.TextBox.CaretBrush = Brushes.Red;
}

}`

Thank you

XceedBoucherS avatar Mar 27 '23 12:03 XceedBoucherS