Hi,
im trying to set the source of a webbrowser to a static string, but when i run it i get an exception. Can anyone tell me why?
Code:
<Window x:Class="FlowDocTest.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:clr="clr-namespace:System;assembly=mscorlib"
xmlns:local="clr-namespace:FlowDocTest"
mc:Ignorable="d"
Title="MainWindow" Height="350" Width="525">
<Window.Resources>
<clr:String x:Key="gg">http://www.google.nl</clr:String>
</Window.Resources>
<Grid>
<!-- This throws an exception -->
<WebBrowser Source="{StaticResource gg}"/>
<!--This works:WebBrowser Source="http://www.google.nl" -->
</Grid>
</Window>