I am trying to bind to the Report property of an StiSLViewerControl in XAML but it appears that the Report property is not a dependency property.
I'm using MVVM Light to implement my code in the MVVM pattern.
Reports.Ultimate 2011.1 (in the GAC with no other versions)
Silverlight 4
The Exception:
Message=Set property 'Stimulsoft.Report.Viewer.StiSLViewerControl.Report' threw an exception.
Message=Object of type 'System.Windows.Data.Binding' cannot be converted to type 'Stimulsoft.Report.StiReport'.
The Bound Property (in my ViewModel):
Code: Select all
public const string ReportViewPropertyName = "ReportView";
private StiReport _reportView = new StiReport();
public StiReport ReportView
{
get { return _reportView; }
set
{
if (_reportView == value)
return;
_reportView = value;
RaisePropertyChanged(ReportViewPropertyName);
}
}
void proxy_GetReportStatisticsCompleted(object sender, GetReportStatisticsCompletedEventArgs e)
{
StiReport report = new StiReport();
report.LoadDocument(e.Result); // e.Result is a byte[ ]
this.ReportView = report;
}
The XAML (in my View):
The View's DataContext is set to my ViewModel class.
Code: Select all
Thanks,
Scott