MESCIUS.ActiveReports.Viewer.Wpf Assembly / GrapeCity.ActiveReports.Viewer.Wpf Namespace / Viewer Class
Members Example

Viewer Class
The WPF based report Viewer control. The WPF Viewer control is used to preview report documents. 
Object Model
Viewer Class
Syntax
'Declaration
 
Public Class Viewer 
   Inherits System.Windows.Controls.Control
 
Remarks
The Viewer control allows displaying and interacting with reports in a WPF application.
Example
The following example shows how to create a Viewer instance in XAML: The following example shows how to load a report into the Viewer in code-behind: For more information on customizing the WPF Viewer, see the documentation page.
<Window x:Class="MyNamespace.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:viewer="clr-namespace:GrapeCity.ActiveReports.Viewer.Wpf;assembly=GrapeCity.ActiveReports.Viewer.Wpf"
        Title="MainWindow" Height="450" Width="800">
    <Grid>
        <viewer:Viewer x:Name="reportViewer" />
    </Grid>
</Window>
public partial class MainWindow : Window
{
    public MainWindow()
    {
        InitializeComponent();
        reportViewer.LoadDocument("path/to/your/report.rdlx");
    }
}
Inheritance Hierarchy

System.Object
   System.Windows.Threading.DispatcherObject
      System.Windows.DependencyObject
         System.Windows.Media.Visual
            System.Windows.UIElement
               System.Windows.FrameworkElement
                  System.Windows.Controls.Control
                     GrapeCity.ActiveReports.Viewer.Wpf.Viewer

See Also