2012-04-17 75 views
4

我一直在嘗試使用擴展的WPF工具包,以便我可以使用RichTextBoxFormatBar,但我似乎要繞圈走。儘管在這裏嘗試了幾個例子和其他網站我不斷收到同樣的錯誤消息:擴展的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。

+0

你正在使用哪一個.NET框架? – gliderkite 2012-04-17 13:24:47

+0

4.0 - 圖書館也是4.0。 – GrandMasterFlush 2012-04-17 13:42:06

+0

我想你已經在你的項目中引用了WPFToolkit.Extended.dll,對吧? – gliderkite 2012-04-17 13:54:40

回答

14

我自己的愚蠢的錯。

當我按照instructions的說明下載ExtendedWPFToolkit_Binaries.zip後,您應該右鍵單擊它,選擇「屬性」,然後選擇「解除阻止」,我忘了解鎖DLL。

希望這篇文章能夠幫助那些犯過同樣錯誤的人。

+0

這是多麼的大聲笑 – Andreas 2013-12-19 15:35:33

+0

同樣的問題,相同的解決方案。 – user3260977 2015-01-31 17:00:04

1

同樣的事情發生在我身上,我最終發現它是因爲我有dll或解決方案存儲在網絡上而不是我的本地計算機。我搬到了本地計算機,並開始工作。

8

我幾乎不是菜鳥 - 但有同樣的問題。 坦率地說,我從來沒有聽說過解封一個.zip文件。就像大多數人一樣,我只是略讀了指示,畢竟我知道如何解壓縮文件 - 或者我想。

因爲我的應用程序可以編譯,運行和工作,但是VS12設計器無法渲染窗口,所以我已經使用擴展工具包1.9.0進行了兩個小時的戰鬥。我看到上面的帖子是關於在展開之前解除封鎖的。想到自己「威士忌探戈狐步舞」是這個傢伙在談論。但我很絕望,所以我關閉了VS.刪除我的擴展文件。這一次沒有阻止。 THEN擴展到了相同的位置。重新啓動Visual Studio,令我驚訝的是,設計師現在呈現控件,並且不會抱怨WatermarkTextBox不在名稱空間等內。

真的是關於更仔細閱讀方向的一種卑鄙的體驗。

相關問題