我一直在尝试使用扩展的 WPF 工具包,以便我可以使用 RichTextBoxFormatBar,但我似乎正在绕圈子。尽管在此处和其他站点上尝试了几个示例,但我仍然收到相同的错误消息:
The attachable property 'FormatBar' was not found in type 'RichTextBoxFormatBarManager'.
The type 'toolkit:RichTextBoxFormatBar' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.
我是 WPF 的新手,所以我知道这是我没有接受的东西,而不是一个错误,谁能告诉我我做错了什么并拯救我的理智?
<UserControl x:Class="TestWPF_Richtextbox.UserControl1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:toolkit="http://schemas.xceed.com/wpf/xaml/toolkit"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<Grid>
<RichTextBox>
<toolkit:RichTextBoxFormatBarManager.FormatBar>
<toolkit:RichTextBoxFormatBar />
</toolkit:RichTextBoxFormatBarManager.FormatBar>
</RichTextBox>
</Grid>
</UserControl>
编辑:库和项目都是 .Net 4。WPFToolkit.Extended.dll 的版本是 V.1.6.0.0。