Do you have plans to make Report bindable
i.e.
XAML
Code: Select all
<my:StiSLViewerControl HorizontalAlignment="Stretch" Name="ReportTemplateViewer" VerticalAlignment="Stretch"
Report="{Binding LoadedReport, Converter={StaticResource LoadedReportConverter}}" />
Code: Select all
public Stream LoadedReport
{
get
{
return this.loadedReport;
}
private set
{
this.loadedReport = value;
this.RaisePropertyChanged("LoadedReport");
}
}
Code: Select all
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
var stream = value as Stream;
if (stream == null)
{
return null;
}
var report = new StiReport();
try
{
report.Load(stream);
return report;
}
catch (Exception ex)
{
throw new ReportLoadException("Report Loading Failed", ex);
}
}