0

i'm binding data to a list view, and need to display a HTML string in a web browser. How would I do this? This is the list:

<ListBox Margin="0,0,-12,0" ItemsSource="{Binding}" Name="postsList">
    <ListBox.ItemTemplate>
        <DataTemplate>
            <StackPanel Margin="0,0,0,17" Width="432">
                <TextBlock Text="{Binding Path=name}" TextWrapping="NoWrap" Style="{StaticResource PhoneTextSubtleStyle}"/>
                <TextBlock Text="{Binding Path=content}" TextWrapping="Wrap" Margin="12,-6,12,0" Style="{StaticResource PhoneTextNormalStyle}"/>
                <phone:WebBrowser Source="{Binding Path=webContent}" Margin="12,-6,12,0" />
            </StackPanel>
        </DataTemplate>
    </ListBox.ItemTemplate>
</ListBox>

TIA, ng93

ctacke
  • 65,838
  • 18
  • 92
  • 152
ng93
  • 1,550
  • 5
  • 22
  • 39
  • 1
    duplicate of http://stackoverflow.com/questions/263551/databind-the-source-property-of-the-webbrowser-in-wpf and http://stackoverflow.com/questions/4202961/can-i-bind-html-to-a-wpf-web-browser-control – Nagg Jan 13 '12 at 14:40
  • in the code you've linked to I cant get [AttachedPropertyBrowsableForType(typeof(WebBrowser))] to work, it says the namespace could not be found. – ng93 Jan 13 '12 at 15:15

0 Answers0