Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8760589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T15:05:06+00:00 2026-06-13T15:05:06+00:00

I have been searching high and low for help regarding binding html content to

  • 0

I have been searching high and low for help regarding binding html content to a richtext block inside my flip view on my item details page and cannot find out any information on how to do what I am after.

I am building a simple news reader app, that gets html content from a feed which I want to display in my flipview.

I created a new default item details page and bind my collection:

this.DefaultViewModel["Group"] = feedItem.Category;
this.DefaultViewModel["Items"] = feedItem.Category.Items;
this.flipView.SelectedItem = feedItem; 

Then inside my DataTemplate of my flipview:

<common:RichTextColumns x:Name="richTextColumns" Margin="117,0,117,47">
    <RichTextBlock x:Name="richTextBlock" Width="560" Style="{StaticResource ItemRichTextStyle}">
        <Paragraph>
            <Run FontWeight="SemiLight" Text="{Binding Content}"/>
        </Paragraph> ...

Content is a string property on my model which I get using HtmlUtilities.ConvertToText(html)

That works perfectly. However, I need images and titles (h1, h2 etc) in the article.

My question is what is the best way to achieve this?

Parsing the html and creating runs, inline ui containers which contain images etc is not a problem. I am using the html agility pack for that, but my question is how can I add these elements to the richtextblocks blocks collection?

I tried having a event on flip view loaded and then getting the current flip view dependency object (this.flipView.ItemContainerGenerator.ContainerFromIndex(flipView.SelectedIndex); and then walking the node tree to find the richtextblock and then setting the blocks property, but it works for the first item and then stops working which I guess has something to do with how the flip view is virtualising the collection.

And to be honest, its getting really confusing for what surely be a simple task!? Surely the xaml team realised that people may want to bind images to the rich text block?

I thought you would be able to bind the content of the rich text block to a property on my model which then returns back the blocks, but rich text block doesn’t seem to have any way to do that, at least from what I can see.

If anyone could help me out, it would be much appreciated. This is driving me crazy.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T15:05:08+00:00Added an answer on June 13, 2026 at 3:05 pm

    I basically had the same problem. My solution si to break the HTML to a list of pragraphs and the use the mentioned this.flipView.ItemContainerGenerator.ContainerFromIndex(flipView.SelectedIndex) to find the RichTextBlock, clear its Inlines and add all the paragprahs to the Inlines collection. A call process with the FlipView`s SelectedItemChanged event

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been searching high and low for a way to paginate an XML
I have been searching high/low on the GooglePlex and here for a sample MVC3
I have been searching the internet high and low for a simple way to
I have been searching high and low, but I have not found a CSS3
I have been searching high and low on the internet for an answer to
I have been searching high and low for a solution to my problem and
For the last few hours I have been searching high and low for a
I have been searching high and low for an answer. I have read through
I have been searching high and low for answers and I'm at a standstill.
I have been searching high and low for a way to get my silverlight

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.