Windows 8 RichEditBox在特定条件下崩溃。
如果我试图将fontsize设置为Rich编辑框,它会崩溃 C#代码: XAML:Windows 8 RichEditBox在特定条件下崩溃。,windows-8,winrt-xaml,Windows 8,Winrt Xaml,如果我试图将fontsize设置为Rich编辑框,它会崩溃 C#代码: XAML: <StackPanel Orientation="Vertical"> <TextBlock Text="Lable for this Field:" Style="{StaticResource TextBlockStyle}"/> <RichEditBox Name="REB_Value"
<StackPanel Orientation="Vertical">
<TextBlock Text="Lable for this Field:" Style="{StaticResource TextBlockStyle}"/>
<RichEditBox Name="REB_Value"
ContextMenuOpening="OnContextMenuOpening"
Style="{StaticResource MyStyle}"
SelectionChanged="OnSelectionChanged" >
</RichEditBox>
</StackPanel>
我不明白为什么会这样 可以显示崩溃堆栈吗?我试图创建一个复制程序,但未能解决问题。让我知道我需要更改什么以实现崩溃:
由于某种原因,我现在无法复制它。它现在可以在没有“\n”的情况下工作。:?奇怪的
<StackPanel Orientation="Vertical">
<TextBlock Text="Lable for this Field:" Style="{StaticResource TextBlockStyle}"/>
<RichEditBox Name="REB_Value"
ContextMenuOpening="OnContextMenuOpening"
Style="{StaticResource MyStyle}"
SelectionChanged="OnSelectionChanged" >
</RichEditBox>
</StackPanel>
<Style x:Key="MyStyle" TargetType="RichEditBox">
...
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="BorderThickness" Value="{StaticResource TextControlBorderThemeThickness}"/>
<Setter Property="FontFamily" Value="{StaticResource ContentControlThemeFontFamily}"/>
<Setter Property="FontSize" Value="14"/>
...
</Style>
SomeOtherREB.Document.SetText(TextSetOptions.None, "123456789");