custom property editor

Grids for WPF Forum

Posted 13 years ago by Mary Fontana - Rudolph Technologies
I created a custom property editor that uses the AnimatedExpander to display the text string. So it will expand to display multi line text.

I would like the header to just show just the first line of this text.
Is there anyway I could do this in the xaml header binding below? Get a substring of of text - first line of text for the header.

I tested below with no header specified and it works fine. Now I would like header to show first line of text. This works but shows entire text in header.

<shared:AnimatedExpander ExpandDirection="Down" Header="{Binding ElementName=textBox, Path=Text}">

<TextBox x:Name="textBox" Margin="0" Padding="0" BorderThickness="0" Background="Transparent" MinLines="1" AcceptsReturn="True"
Text="{Binding ValueAsString, RelativeSource={RelativeSource AncestorType={x:Type propgridPrimitives:IPropertyDataAccessor}}, Mode=TwoWay, ValidatesOnExceptions=True, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Converter={StaticResource NoOpConverter}}" />


Comments (1)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Mary,

You would have to build a custom IValueConverter and use that in your Binding. The converter would take the first line of test and/or trim as needed.

Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.