You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried different ways to modify IntegerUpDown to get rounded edges.
Here are my observations:
IntegerUpDown -> CommonNumericUpDown -> NumericUpDown -> UpDownBase -> InputBase -> InputBase -> Control
NumericUpDown has a Style that indicates that the control consists of a ButtonSpinner x:Name="PART_Spinner" and a WatermarkTextBox x:Name="PART_TextBox"
(in the NumericUpDown class it is specified that [TemplatePart( Name = PART_TextBox, Type = typeof( TextBox ) )])
Everything is clear here
WatermarkTextBox -> AutoSelectTextBox -> TextBox
WatermarkTextBox also has its own Style and defines a new Template for it.
I've been trying to change different Templates in different places throughout the day, but I still can't get the result I want
The text was updated successfully, but these errors were encountered:
Hi,
From what I can see, there is no direct way to modify the CornerRadius of a NumericUpDown.
We will try to add a property to easily modify this.
In the meantime, if you have access to the source code, here's how a CornerRadius can be set:
In file Xceed.Wpf.Toolkit/ButtonSpinner/Themes/Aero2.NormalColor.xaml,
In style targeting : x:Type local:ButtonSpinner, in the ControlTemplate for x:Type local:ButtonSpinner,
The first Border can have a CornerRadius of 10:
This will force a 10 CornerRadius on the 4 sides, but only visible on the lest side since the Up/Down buttons are over the right part.
Then, in the same ControlTemplate, the RepeatButton PART_IncreaseButton has a set style : remove it. then add it's style with a TopRight corner radius of 10:
In the same way, for PART_DecreaseButton, you can remove its style and add a new one with a bottomRight Corner Radius:
I tried different ways to modify IntegerUpDown to get rounded edges.
Here are my observations:
IntegerUpDown -> CommonNumericUpDown -> NumericUpDown -> UpDownBase -> InputBase -> InputBase -> Control
NumericUpDown has a Style that indicates that the control consists of a ButtonSpinner x:Name="PART_Spinner" and a WatermarkTextBox x:Name="PART_TextBox"
(in the NumericUpDown class it is specified that [TemplatePart( Name = PART_TextBox, Type = typeof( TextBox ) )])
Everything is clear here
WatermarkTextBox -> AutoSelectTextBox -> TextBox
WatermarkTextBox also has its own Style and defines a new Template for it.
I've been trying to change different Templates in different places throughout the day, but I still can't get the result I want
The text was updated successfully, but these errors were encountered: