0

如何在 WPF 中绑定 DocumentPageView?
我的代码:

<DocumentPageView DocumentPaginator="{Binding Source}"></DocumentPageView>

Source 是 DocumentPaginator 的类型。错误是:

错误 1 ​​无法在“DocumentPageView”类型的“DocumentPaginator”属性上设置“绑定”。只能在 DependencyObject 的 DependencyProperty 上设置“绑定”。

请帮我。天...

4

1 回答 1

3

您的错误消息说明了一切。您只能将绑定应用到 DependencyProperty。DocumentPaginator 不是 DocumentPageView 的 DependencyProperty,所​​以不能绑定到它。

于 2012-01-06T15:37:08.193 回答