I'm having trouble using the DocumentPreview in a WPF application. I'm trying to write it MVVM compliant (for unit testing purposes) which means, simply, binding important data to a datastructure behind it. However, when I do a line like:
Code:
<UserControl x:Class="ICS.TestStepView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:MigraDoc="clr-namespace:MigraDoc.Rendering.Windows;assembly=MigraDoc.Rendering-WPF">
...
<MigraDoc:DocumentPreview Ddl="{Binding BatchRecordDoc}"/>
...
</UserControl>
... then in runtime when the DocumentPreview is instantiated the error is thrown:
Code:
A 'Binding' cannot be set on the 'Ddl' property of type 'DocumentPreview'. A 'Binding' can only be set on a DependencyProperty of a DependencyObject.
What's everyone's preferred workaround on this one? Will there be a version of MagraDoc that fixes this?