How to use List and Table

In a previous thread (Replacement for TextFlow) I was mentioning replacing TextFlow with TextBlock. Though I was able to use TextBlock for the inline elements (bold, hyperlink etc.), I couldn't find a way to display block elements (list and tables). How can I display them without using FlowDocument



Answer this question

How to use List and Table

  • Howard Shachter

    As detailed by our content schema, Block elements must ultimately reside inside a FlowDocument.

    Can you provide more info about your specific scenario and why a FlowDocument does not work for you


  • Knack Sixty

    Thank you. I have solved the problem a couple of days ago by using FlowDocument and styling the viewer. However, because I intend to use data binding for the content, I will probably switch to using UIElements - it's not easy to generate flow content through data binding.


  • Jigabyte

    Ok, I dug up your original post, so I have a better idea what you are trying to do.

    If you prefer to remain in a TextBlock you would need to:

    1. Swap you Tables for Grids (depending on what you needed the Table layout for)

    2. Display your "List" info in another some other element (you had pointed out that each page only has 5-10 pieces of "flow content", so maybe this could work for you).

    If you absolutely need to hang on to the Table and List elements, you have no other option but to use a FlowDocument inside a styled viewer that fits your visual needs.


  • How to use List and Table