This question is locked. New answers and comments are not allowed.
It seems that if I explicitly set style in code that it is overriding and eliminating all other default styles on the control correct?
I am trying to set the following styles, see code below, which does work. Unfortunately when I do this it seems to change the behavior of the up/down arrows. If I press and hold the up or down arrow with these styles applied it no longer continuously increase/decreases the number like it did without these styles. I now have to keep pressing to increase/decrease. Is there a property I need to set so the continuous increase still works? If so what would the Setter be?
Thanks
Simon
Style numericUpDownButtonStyle = new Style();
numericUpDownButtonStyle.TargetType = typeof(InlineButton);
numericUpDownButtonStyle.Setters.Add(new Setter() { Property = InlineButton.ForegroundProperty, Value = new SolidColorBrush(Colors.Black) });
numericUpDownButtonStyle.Setters.Add(new Setter() { Property = InlineButton.BackgroundProperty, Value = new SolidColorBrush(Colors.White) });
numericUpDownButtonStyle.Setters.Add(new Setter() { Property = InlineButton.HeightProperty, Value = 41 });
numericUpDownButtonStyle.Setters.Add(new Setter() { Property = InlineButton.WidthProperty, Value = 40 });
numericUpDownButtonStyle.Setters.Add(new Setter() { Property = InlineButton.BorderBrushProperty, Value = this.numericBoxPicker.BorderBrush });
numericUpDownButtonStyle.Setters.Add(new Setter() { Property = InlineButton.BorderThicknessProperty, Value = numericBoxPicker.BorderThickness });
numericUpDownButtonStyle.Setters.Add(new Setter() { Property = InlineButton.PointerOverBackgroundBrushProperty, Value = new SolidColorBrush(Colors.White) });
numericUpDownButtonStyle.Setters.Add(new Setter() { Property = InlineButton.PointerOverBorderBrushProperty, Value = new SolidColorBrush(Colors.Black) });
numericUpDownButtonStyle.Setters.Add(new Setter() { Property = InlineButton.PointerOverForegroundBrushProperty, Value = new SolidColorBrush(Colors.Black) });
numericBoxPicker.DecreaseButtonStyle = numericUpDownButtonStyle;
numericBoxPicker.IncreaseButtonStyle = numericUpDownButtonStyle;