Upgrade Editors

Editors for WPF Forum

Posted 7 months ago by Li Xiang
Version: 23.1.2
Avatar

1. We want to customize a BrushEditBox: Because there is no longer PartEditBox in the new version, after upgrading, I can only find PartEditBoxBase<T>. However, the GenerateDefaultItems function in the original PartEditBox has been removed. How can I generate the appearance of the edit box text area now?

If we want to customize the DecimalEditBox  or customize the ExpressionEditBox, how can we go about implementing it? There are no example codes provided for customizing EditBoxes in the samples(V23.1). However, in version 16.1 of the samples, there are example codes provided for customizing EditBoxes.

2. In the ActiproSoftware.Windows.Media namespace, the ConvertBack function of the ColorToBrushConverter class has not been implemented yet. What equivalent can be used to replace it?

public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
    throw new NotImplementedException();
}

[Modified 7 months ago]

Comments (3)

Posted 7 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

We don't currently have any examples of creating a custom edit box in the newer codebase.  Can you go into specific detail on what functionality you are trying to achieve with a customized edit box?

1) The newer design has a PartEditBoxBase.GenerateParts() method.  That is where a list of IPart instances would be returned that contain the parts for the edit box.

2) The ColorToBrushConverter implementation is just a one-way conversion for a Color to a SolidColorBrush, which is why ConvertBack is not implemented.  You would have to write your own converter if you are looking for custom logic to convert a brush back to a color.  That can be difficult if you encounter anything other than a SolidColorBrush as a value, since things like gradient brushes have many colors.


Actipro Software Support

Posted 7 months ago by Li Xiang
Avatar

We want to implement a control where, while typing in the edit box, a TreeListView of matching items is displayed. When clicking a PopupButton, it should show a popup for defining new items. We found an AutoCompleteBox, but its style doesn't meet our requirements. Additionally, the AutoCompleteBox doesn't inherit from PartEditBoxBase, so some Picker-related features cannot be set.
We not only want to implement this specific control but also similar controls like SizeEditBox, which display values in the edit box like [Name(string), Age(int), Sex(string)]. There are also some other styles of controls implemented in the old version, but due to the lack of a method for customizing EditBoxes in the new version, the progress of porting these custom controls from the old version has been slow.

Posted 7 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

We have added a new Custom Edit Box QuickStart for you for the next maintenance release that hopefully will lead you down the right path to making a custom edit box in v23.1+.  Note we made a couple API updates in the core product to support this too.


Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.