This project has moved. For the latest updates, please go here.

Caret cursor color in the IntegerUpDown

Mar 6, 2012 at 8:28 AM
Edited Mar 6, 2012 at 8:29 AM

Hi, default NumericUpDown template contains next style:

<Style x:Key="NumericUpDown" TargetType="Control">
  <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
  ...
  <Setter Property="Template">
    <Setter.Value>
      <ControlTemplate TargetType="Control">
        <local:ButtonSpinner x:Name="Spinner" IsTabStop="False" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}"
        AllowSpin="{Binding AllowSpin, RelativeSource={RelativeSource TemplatedParent}}" ShowButtonSpinner="{Binding ShowButtonSpinner, RelativeSource={RelativeSource TemplatedParent}}">
         <local:WatermarkTextBox x:Name="TextBox" BorderThickness="0" Background="Transparent" .. />
        </local:ButtonSpinner>
      </ControlTemplate>
    </Setter.Value>
  </Setter>
</Style>

WatermarkTextBox explicitly has the transparent background, thus caret cursor in this textbox always will be black, but this differ from a standard textbox behavior (caret cursor color depends of textbox background).

May be Background="Transparent" should be replaced by Background="{TemplateBinding Background}"?

Coordinator
Mar 8, 2012 at 3:01 PM

I have written your suggestion down.  However, I strongly recommend you to create an item in the "Issue Tracker" section.  It would prevent your idea from being lost in the discussions list and would allow people to upvote it.

Aug 15, 2012 at 2:48 PM

This will be fixed in the next version of the toolkit

Sep 25, 2012 at 8:20 PM

This is fixed in version 1.7.0