Creating reports and dashboards | Stimulsoft community forum
Reporting tool and data analytics tools for creating reports and dashboards in ASP.NET, ASP.NET MVC, .NET Core, Blazor, Angular, PHP, Python, WPF, JavaScript, and Java applications.
Today I tried to change background color of StiWpfViewerControl in our WPF application, but trying all the possible solutions We did not manage to accomplish this. this control is placed inside DockPanel and we want to make its background color transparent.
public MainWindow()
{
DataSet ds = null;
InitializeComponent();
try
{
var report = new StiReport();
StiOptions.Viewer.Windows.BackgroundColor = System.Drawing.Color.Transparent; // works only if ShowWithWpf() method called
stiWpfViewerControl1.Background = new SolidColorBrush() { Color = Colors.Red }; // Does not work
report.Load("DemoReport.mrt");
report.Compile();
report.Render(false);
//report.ShowWithWpf();
stiWpfViewerControl1.Report = report;
}
Aleksey wrote:Hello,
You can set the DockPanelMain property for StiWpfViewerControl.
Thank you.
What do u mean under setting DockPanelMain property? which property I should set? I want to change that gay blue style background color when displaying report inside StiWpfViewerControl
Ok I check this but there is no such property neither in stiWpfViewerControl1 XAML nor in code Our version of Stimulsoft is 2012.1
Could you please provide information where I can find this property?
That I found it but it is not e property it is a private field which gets its' value during constructor call so it seems there is no way to set it. ideal solution would be to set background from XAML style