xceedsoftware / wpftoolkit

All the controls missing in WPF. Over 1 million downloads.
Other
3.9k stars 878 forks source link

Changing Caret Color for Controls #1717

Open Kuumba123 opened 2 years ago

Kuumba123 commented 2 years ago

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

XceedBoucherS commented 2 years ago

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.

Kuumba123 commented 2 years ago

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

dkschruteBeets commented 1 year ago

+1. Would also like to see this.

Kuumba123 commented 1 year ago

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

XceedBoucherS commented 1 year ago

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