Hello,
We have a scenario where we are using SyntaxEditor controls as items within a TreeListBox. The problem we are facing is that the space key does not work in this configuration - spaces are not added within the text section of the syntax editor.
Pressing the space key works correctly if using a textbox instead of the syntax editor control - Snoop shows us some kind of RoutedUICommand when pressing space.
This can be easily replicated by modifying the provided sample project TreeListBoxChecking - by changing the field template as follows:
<sample:CustomTemplateSelector x:Key="CustomTemplateSelector">
<sample:CustomTemplateSelector.FieldTemplate>
<DataTemplate>
<Grid Margin="-17,0,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<syntaxeditor:SyntaxEditor IsMultiLine="False" MinWidth="100"/>
<TextBox Margin="150,0" MinWidth="100"></TextBox>
<!--<CheckBox Margin="0,0,4,0" VerticalAlignment="Center"
Visibility="{Binding IsCheckable, Converter={StaticResource BooleanToVisibilityConverter}}"
IsChecked="{Binding IsChecked, Mode=TwoWay}"
/>
<TextBlock Grid.Column="1" Text="{Binding Name}" TextTrimming="CharacterEllipsis" VerticalAlignment="Center" />
<Button Grid.Column="2" Margin="4,0" Padding="5,0" Content="..." Command="{Binding ShowDialogCommand}"
Style="{StaticResource {x:Static themes:SharedResourceKeys.ButtonBaseStyleKey}}" />-->
</Grid>
</DataTemplate>
</sample:CustomTemplateSelector.FieldTemplate>
In this configuration, you can clearly see that the space key does not work for the syntax editor but works perfectly for the textbox.
One other thing we've noticed is that the TreeListBoxItem container seems to catch focus when pressing space - but only the very first time.
Please help us in resolving this issue as we need to be able to use the space key within syntax editors hosted in a TreeListBox control.
Kinds regards,
Cristian