tried to inherit from int32editboxbase

Editors for WPF Forum

Posted 14 years ago by Bernhard Wahl
Version: 9.2.0512
i tried to inhert from int32editboxbase (uint) because i need a uinteditbox and i think this will be easiest way to solve my requirement, but i dosen't works. I didn't see anything it seems so that the uinteditbox haven't a template. Maybe anybody knows a hint or solution how to solve this.

Comments (1)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Bernhard,

If you need to support UInt32, then you can't derive your custom PartEditBox from Int32EditBoxBase, as that just deals with the Int32 type. You would need to derive from RangeTypeSpecificEditBoxBase<UInt32>.

Our Sample Browser shows how a Social Security Number custom PartEditBox is built. I suspect that you did not define the default Styles for your type, so nothing was displayed.

Aside from that, you can probably just leverage the DoubleEditBox. You would simply set it's Minimum value to 0, the Maximum to UInt32.MaxValue, and the Format to "F0". Then you'd create a custom IValueConverter that casts from a UInt32 to a Double (and back again in ConvertBack) and use that when binding to the Value property.

Actipro Software Support

The latest build of this product (v24.1.2) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.