Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
579 views
in Technique[技术] by (71.8m points)

richtextbox - Extended WPF Toolkit - using the RichTextBoxFormatBar

I've been trying to use the Extended WPF Toolkit so that I can make use of the RichTextBoxFormatBar but I seem to be going round in cirlces. Despite trying several examples on here and other sites I keep getting the same error messages:

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.

I'm new to WPF so I'm know it's something I'm not picking up on rather than a bug, can anyone tell me what I'm doing wrong and save my sanity?

<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>

EDIT: Both the library and the project are .Net 4. The version of the WPFToolkit.Extended.dll is V.1.6.0.0.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

My own stupid fault.

I'd forgotten to unblock the DLL when I downloaded it as per the instructions which say that after downloading the ExtendedWPFToolkit_Binaries.zip you should then right click on it, select "Properties" and then "Unblock".

Hopefully this post will help someone else who has made the same mistake.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...