
Thank you for your answer. It helped partly. I have created a own DataTemplate for the name of our single property.
The DataTemplate will be loaded successfully. I tested it with a colored background.
But the keybinding to the command doesn't work
In our DataTemplate for the value the keybinding to the command is working. It's the same viewmodel class.
This is the DataTemplate for the NameTemplate:
<DataTemplate DataType="{x:Type customEditors:EditorForCollectionsDisplayText}" x:Key="EditorForCollectionsDisplayTextNameTemplate">
<Grid Background="Red" >
<Grid.InputBindings>
<KeyBinding Key="Insert" Command="{Binding Value.AddNewItemCommand, RelativeSource={RelativeSource AncestorType={x:Type propertyGrid:IPropertyDataAccessor}}}" />
</Grid.InputBindings>
<StackPanel Orientation="Horizontal" >
<TextBlock Text="{Binding DisplayName, RelativeSource={RelativeSource AncestorType={x:Type propertyGrid:IPropertyDataAccessor}}}" Margin="0 0 15 0"/>
<TextBlock Text="{Binding Value, RelativeSource={RelativeSource AncestorType={x:Type propertyGrid:IPropertyDataAccessor}}}" />
</StackPanel>
</Grid>
</DataTemplate>
Do you have any ideas?
Best Regards