Custom PartEditBox for Strings

Editors for WPF Forum

Posted 12 years ago by SvenG - VIPA
Version: 12.2.0570

Hi guys,

I have a quite simple requirement: I want a TextBox that allows for adding custom content. E.g. an icon.
Like what can be seen in the "Part Edit Box Item Placement QuickStart".

You provide all kind of PartEditBoxes (int, double, datetime) but the simplest one for strings is unfortunately not available.

Tried to adapt the SSN sample but found it much to complicated for my rather simple requirement.
Can you tell me how to build a custom PartEditBox for type String ??

Tried to derive it, but got stuck.. :

 public class TextEditBox : TypeSpecificEditBoxBase<String>


Thanks in advance ...

Comments (2)

Answer - Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA

Hi Sven,

If you are just trying to add content to the inside of a TextBox, you are probably better off retemplating a normal TextBox control.  That will use fewer elements.  If you are a WPF Studio customer you can download our default styles/templates, which contain templates for native controls like TextBox.  Just clone that and inject something like an Image or Button in it.  Then apply that new template to your customized TextBox.

Actipro Software Support

Posted 12 years ago by SvenG - VIPA

Thank you so much for your quick response! I did as you suggested and created my own control based on the TextBox Template, which works like a charm.

Thanks again ! 



[Modified 12 years ago]

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.