Hi,
I am using
Infragistics.Controls.Interactions.XamHtmlViewer in my Silverlight project. I assigned a valid URI to SourceUri property. I also wanted the URL to open in a new window. Can you help me with the code?
Currently I have
this.xamHTMLProjections.SourceUri = new Uri(strURL);
xamHTMLProjections is of type - Infragistics.Controls.Interactions.XamHtmlViewer
Thanks,
Girish
Hello Girish,
It's expected that the webpages you load will appear on the child pages that contain the XamHtmlViewer.
If you want the child pages to load another window to display the webpage then you need to create additional page(s) when the child page is clicked on that display an XamHTMLViewer instead of adding it to the child page directly.
Let me know if you have any questions.
Hello Mike,
Currently I have a third-party docpanel (blacklight:DragDockPanelHost)
on Home.xaml which houses child pages and each child page is an .XAML file and inside each .XAML file, I have below code.
public Home()
{
InitializeComponent();
this.dragDockHost.Loaded += new RoutedEventHandler(dragDockHost_Loaded);
}
void dragDockHost_Loaded(object sender, RoutedEventArgs e)
CDPDashboard cdp = new CDPDashboard();
dragDockHost.Items.Add(cdp);
ProjectionsDashboard proj = new ProjectionsDashboard();
dragDockHost.Items.Add(proj);
MaintenanceDashboard maint = new MaintenanceDashboard();
maint.Maximize();
dragDockHost.Items.Add(maint);
DealDashboard deal = new DealDashboard();
dragDockHost.Items.Add(deal);
eReportingDashboard eReporting = new eReportingDashboard();
dragDockHost.Items.Add(eReporting);
One of the child Page XAML code,
<blacklight:DragDockPanel
xmlns:igHtmlViewer="clr-namespace:Infragistics.Controls.Interactions;assembly=InfragisticsSL4.Controls.Interactions.XamHtmlViewer.v10.3"
x:Class="NextGen.SL.Dashboards.ProjectionsDashboard"
xmlns="">schemas.microsoft.com/.../presentation"
xmlns:x="">schemas.microsoft.com/.../xaml"
xmlns:d="">schemas.microsoft.com/.../2008"
xmlns:mc="">schemas.openxmlformats.org/.../2006"
xmlns:blacklight="clr-namespace:Blacklight.Controls;assembly=Blacklight.Controls"
Margin="2" Header="Projections Dashboard"
>
<Grid x:Name="LayoutRoot" Background="White">
<igHtmlViewer:XamHtmlViewer HorizontalAlignment="Left" Margin="0,0,0,0" x:Name="xamHTMLProjections" VerticalAlignment="Top" />
</Grid>
</blacklight:DragDockPanel>
currently I am having below code to fill in the xamHTMLProjections with a content page
Helper helper = new Helper();
string strURL = helper.getAppSetting("ProjectionsDashboard");
if (strURL.Trim().Length > 0)
My requirement is, when I click on each child page on Home.XAML, each child page should open in a new window rather than filling the each xamlviewer on each child page with corresponding content.
Hope you are clear with the requirements. Let me know If you have any further questions.
Thank you for following up. Since the sample I sent you doesn't help, please list your requirements. Perhaps you can provide a mockup/screenshot of the desired behavior. And also, please clarify what action(s) trigger the new window to open.
Hi Michael,
Can you send me a sample solution explaining above trick. Attached sample is not helping me. Try to launch the URL in a separate window. Thanks for your help!
Best Regards,
Thank you for contacting Infragistics. We had a chat regarding this matter and I explained that another window would have be created and launched in order to keep the XamHTMLViewer separate from the rest of your application.
I attached a sample demonstrating how to use the XamHTMLViewer as a standalone window. Let me know if you have any questions.
HTMLViewDevIssue.zip
Sincerely,
Michael Di FilippoAssociate Software DeveloperInfragistics, Inc.www.infragistics.com/support