We are finishing up a 'container' Silverlight application that makes a lot of use of pages with different HtmlPlaceholders being loaded within a common ContentFrame. The application supplies credentials when it can, and determines which users have access to which embedded web/browser-based applications.
Whenever a user switches the navigation on the ContentFrame (selects a different application button) the Chrome debugger (and others) reports the following error:
Uncaught Error: Unhandled Error in Silverlight 2 Application Value does not fall within the expected range. at MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[] cvData) at MS.Internal.XcpImports.MethodPack(IntPtr objectPtr, String methodName, Object[] rawData) at MS.Internal.XcpImports.UIElement_TransformToVisual(UIElement element, UIElement visual) at Telerik.Windows.Controls.ApplicationHelper.TransformToScreenRoot(UIElement target) at Telerik.Windows.Controls.RadHtmlPlaceholder.OnLayoutUpdated() at Telerik.Windows.Controls.RadHtmlPlaceholder.<Init>b__14()
The page is really simple:
<navigation:Page
NavigationCacheMode="Disabled"
x:Class="Portal.Foo"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"><br><span class="Apple-tab-span" style="white-space:pre">
<Grid
x:Name="LayoutRoot"
Style="{StaticResource LayoutRootGridStyle}"
Margin="0">
<telerik:RadHtmlPlaceholder
x:Name="HtmlHostCtrl
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Margin="5,5,5,5" />
</Grid>
</navigation:Page>
As is the code:
using System;
using System.Windows;
using System.Windows.Browser;
using System.Windows.Media;
using System.Windows.Navigation;
namespace Portal.Foo
{
public partial class Bar
{
App a = (App)System.Windows.Application.Current;
public Bar()
{
InitializeComponent();
HtmlHostCtrl.SourceUrl = new Uri(a.BarUrl as String);
}
protected override void OnNavigatedFrom(NavigationEventArgs e)
{
HtmlHostCtrl.Visibility = System.Windows.Visibility.Collapsed;
}
protected override void OnNavigatedTo(NavigationEventArgs e)
{
HtmlHostCtrl.Visibility = System.Windows.Visibility.Visible;
}
}
}
Any guidance would be most welcome. The application mostly works despite these errors, but the Silverlight application does lock up (go blank) sometimes with a lot or rapid page navigation, and I think this may be related.
TIA,
Andy