在UWP中使用RichEditBox只读时图片显示问题(最后有关于RichEditBox颜色问题的解决方案)
今天学到了uwp中还有一个叫richeditbox的控件,感觉rtf还是挺适合做一个阅读器之类的,就简单地写了这么一些代码:
xaml中的代码如下:
<Page
x:Class="RichTest.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:RichTest"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<RichEditBox Name="display" IsReadOnly="True"></RichEditBox>
</Grid>
</Page>
cs代码如下:(为了说明省略了一些东西)
using System;
using System