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

Problem inhereting from UpDownBase

Nov 9, 2010 at 9:56 AM

I love NumericUpDown control and have a small observation. I tried to inherit from UpDownBase in my code, f.e.

namespace Test {

public class IntNumericUpDown : UpDownBase<int> {

...

private void SeValiadSpinDirection() {

...

if (Spinner != null) {

...

It resulted in an error message that Spinner is a type but used as an variable. When I place the code in the toolkit using Microsoft.Windows.Controls namespace,

it compiles fine.

Nov 9, 2010 at 1:55 PM

This is because the UpDownBase<T> has an internal constructor, and is not meant to be used outside the toolkit.  It is actually an experimentation, which may go away when I start working on the time picker and masked textbox control.  If you download the source and change the constructore to public, you should have no problems.  Just to let you know, the NumericUpDown control handles integerss as well, but I am sure you have your reasons for creating an UpDownBase<int>.  Let me know if that fixes your problem.

Nov 9, 2010 at 3:04 PM

Yes, it does. Thanks a lot.

From: brianlagunas [mailto:notifications@codeplex.com]
Sent: Tuesday, November 09, 2010 9:56 AM
To: genador@gmail.com
Subject: Re: Problem inhereting from UpDownBase [wpftoolkit:234001]

From: brianlagunas

This is because the UpDownBase<T> has an internal constructor, and is not meant to be used outside the toolkit. It is actually an experimentation, which may go away when I start working on the time picker and masked textbox control. If you download the source and change the constructore to public, you should have no problems. Just to let you know, the NumericUpDown control handles integerss as well, but I am sure you have your reasons for creating an UpDownBase<int>. Let me know if that fixes your problem.

Read the full discussion online.

To add a post to this discussion, reply to this email (wpftoolkit@discussions.codeplex.com)

To start a new discussion for this project, email wpftoolkit@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com