Live Chat Icon For mobile
Live Chat Icon

How can I use the BlockUIContainer element to host UIElement objects within Flow content ?

Platform: WPF| Category : Flow Content, Printing

A BlockUIContainer is a flow content element that allows UIElement to be hosted inside the flow content. This can be done as follows.


<FlowDocument ColumnWidth='400'>
  <Section Background='GhostWhite'>
      A UIElement element may be embedded directly in flow content
      by enclosing it in a BlockUIContainer element.
      <Button>Click me!</Button>
      The BlockUIContainer element may host no more than one top-level
      UIElement.  However, other UIElements may be nested within the
      UIElement contained by an BlockUIContainer element.  For example,
      a StackPanel can be used to host multiple UIElement elements within
      a BlockUIContainer element.
        <Label Foreground='Blue'>Choose a value:</Label>
          <ComboBoxItem IsSelected='True'>a</ComboBoxItem>
        <Label Foreground ='Red'>Choose a value:</Label>
        <Label>Enter a value:</Label>
          A text editor embedded in flow content.

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.