Hello,
We have a scenario where we are using SyntaxEditor controls as item hosted in PopupContentTemplate. The problem we are facing is that SyntaxEditor does not accpect Chinese character even my current input method is Chinese(Simplified)
This can be easily replicated by modifying the provided sample project PopupButtonIntro - by changing the field template as follows:
<DataTemplate x:Key="EditorPopupContentTemplate">
<shared:ResizableContentControl MinHeight="50" Width="298">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Border Background="{DynamicResource {x:Static themes:AssetResourceKeys.ContainerBackgroundMidBrushKey}}"
BorderThickness="0,0,0,1" BorderBrush="{DynamicResource {x:Static themes:AssetResourceKeys.PopupBorderNormalBrushKey}}">
<DockPanel LastChildFill="True" Margin="4,1,1,1">
<Button DockPanel.Dock="Right" Width="19" Height="19" Command="{x:Static shared:PopupButton.ClosePopupCommand}"
Style="{DynamicResource {x:Static themes:SharedResourceKeys.EmbeddedButtonBaseOverrideStyleKey}}"
ContentTemplate="{DynamicResource {x:Static themes:SharedResourceKeys.CloseGlyphTemplateKey}}" />
<TextBlock Text="Popup" VerticalAlignment="Center" />
</DockPanel>
</Border>
<editor:SyntaxEditor Grid.Row="1"
WordWrapMode="Word"
AreWordWrapGlyphsVisible="True"
VerticalAlignment="Stretch">
<editor:SyntaxEditor.ViewMarginFactories>
<sample:CustomMarginFactory />
</editor:SyntaxEditor.ViewMarginFactories>
<editor:EditorDocument xml:space="preserve"><![CDATA[This QuickStart shows how to create an advanced custom vertical margin that displays the number of characters on each view line. The foreground brush used to render the character count changes as the number of characters increases.
This is an excellent sample for seeing how to create a margin that renders custom content related directly to the visible view lines.]]></editor:EditorDocument>
</editor:SyntaxEditor>
</Grid>
</shared:ResizableContentControl>
</DataTemplate>
In this configuration, you can clearly see that the Chinese character does not work for the syntax editor but works perfectly for the textbox.
Please help us in resolving this issue as we need to be able to use Chinese character within syntax editors hosted in a PopupContentTemplete.
Kinds regards,
Joey Lu
[Modified 1 year ago]