How to integrate the OlapClient WPF Control in Asp.net application
This can be achieved by creating a WPF Browser Application with OlapClient Control and hosting that XBAP in Asp.Net application.
Creating a WpfBrowser Application
The following are the steps to create WPF Browser Application.
- Create a WPF Browser Application Project in VisualStudio 2012.
- Add the OlapClient control in Mainpage.xaml and bind the OlapData.
- Open Properties window of that WPF Browser Application
- Click on Application Tab
- Ensure that Target Framework must be .NET Framework 3.5/4/4.5(to use Syncfusion Controls)
- Click on Security Tab
- Select “This is full trust application” Radio Button.
- Run the WPF Browser Application, WPF OlapClient will be rendered in browser.
The following is the screenshot of the Output.
Creating Asp.Net Application and Integrating the XBAP
The steps to create the Asp.Net application and integrating the XBAP into that application is as follows:
- Create Asp.Net web application in Visual Studio 2012.
- Create a folder in that Asp.Net web application and move the following files which are created in WPF Browser Application,
- In Default.aspx page, add any object of your convenience(For Ex: iframe), set runat attribute as “server” and src attribute as “~/<foldername>/test.xbap”
- Run the ASP.Net web Application, WPF OlapClient will be rendered in .aspx page with help of .xbap file.
The following screenshot shows how the OlapClient Control is displayed in Asp.Net application.