I would like to use relative URI for the XamHtmlViewer SourceUri property. Is this possible by any means? Currently I'm getting and InvalidOperationException when the viewer is trying to use the AbsoluteUri-property of the URI.
{System.InvalidOperationException: This operation is not supported for a relative URI. at System.Uri.get_AbsoluteUri() at Infragistics.Controls.Interactions.XamHtmlViewer.SourcePropertyIsChanged() at Infragistics.Controls.Interactions.XamHtmlViewer.OnSourceUriPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e) at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue) at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation) at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet) at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value) at Infragistics.Controls.Interactions.XamHtmlViewer.set_SourceUri(Uri value) at mycode....
Hi,
I have created a case on your behalf. Through the case you can be notified when this issue is resolved.
(Case Number: CAS-80367-4SJ0YC, Work Item: #98280).
Meanwhile, you can use HtmlPage.Document.DocumentUri to get the absolute uri of the page where the xap is hosted and construct an absolute uri.
Regards
Thanks, I have created a workaround similar to the approach of what you suggested and that works for me at the moment pretty well. Things would be easier if I would be able to just use relative url though.