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

Inheriting from UpDownBase

Dec 16, 2011 at 4:25 PM
Edited Dec 16, 2011 at 4:26 PM

I tried to inherit from UpDownBase in my code

namespace StringTest {

public class StringUpDown : UpDownBase<string> {


 I did make the UpDownBase constructor public, the code compile but when I run my Test app the control doesn't show. 

I also tried inheriting from NumericUpDown to create an IntUpDown or DoubleUpDown just to test as these are controls that already exist, and I run into the same issue as above. any clues to what I am missing are greatly appreciated.


Dec 16, 2011 at 4:38 PM

You need to create a control template for your control and set the DefaultStyle property in the static constructor of your derived class.

Dec 16, 2011 at 7:49 PM

Thanks Brian, it worked.