what is equivalent WindowsFormsHost in C# winform?
i wrote program in C# winform. in my user control(instead of form), i put reporting. when user clicked btnReporting, rptfile is shown.
this is my code in wpf. i don’t equivalent WindowsFormsHost in C# winform?
CrystalReportViewer rptViewer = new CrystalReportViewer();
rptViewer.DisplayStatusBar = false;
WindowsFormsHost host = new WindowsFormsHost();
rptViewer.ReportSource = rep;
host.Child = rptViewer;
ReportRpt PageRpt = new ReportRpt();
PageRpt.GrdReport.Children.Add(host);
NavigationService navService = NavigationService.GetNavigationService(this);
navService.Navigate(PageRpt);
For showing crystal report on Winform, you may add the Crystal Viewer from the toolbox on the form and set the crystal report against it.
Please see: Displaying Crystal Reports using WinForms and C#
but if you want to host a WPF control in Winform then you can use ElementHost