question

GEORGEFELIX-0027 avatar image
1 Vote"
GEORGEFELIX-0027 asked GEORGEFELIX-0027 answered

Is HierarchicalDataTemplate working except ItemsControl and Treeview in wpf?

I’m creating flow document that contains nested tables.

I want to create nested tables using custom control(Section) data binding. So I need hierarchical template in Resources.

Is there any idea? (I couldn’t use itemscontrol; because used frameworkcontentelement(Block) only instead of framework element(BlockUIContainer).

Thank you in advanced.

dotnet-csharpwindows-wpf
· 6
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@GEORGEFELIX-0027
Did you want put a nest table in BlockUIContainer in FlowDocument? The approximate code structure is as follows:

 <FlowDocumentReader BorderThickness="1" BorderBrush="Blue">  
     <FlowDocument ColumnGap="30"> 
          <Section>
             <BlockUIContainer>
                         <!-- The Nest table-->
              </BlockUIContainer>
          </Section>
     </FlowDocument>        
 </FlowDocumentReader>
0 Votes 0 ·

Thank you for the response from you, Microsoft.

<BlockUIContainer> <!-- The Nest table--> </BlockUIContainer>
Currently we cannot create a Table in BlockUIContainer.

But we can create a Table in a Section Block.

ex)
<Section>
<!-- The Nest table-->
</Section>

Could you please see the below example on [Feb 14 2021 at 11:53 PM].
I need this(<!-- The Nest table-->) using HierarchyTemplate with Itemssource Binding, like ItemsControl.

<!-- The Nest table-->

please kindly help me.

Needed Nested HierachyTemplate for Section or Table.
Because it needs for create various printing purposes.
Thank you in advance




0 Votes 0 ·


The above example, I need using HierarchyTemplate.

https://docs.microsoft.com/en-us/archive/msdn-magazine/2009/april/create-flexible-uis-with-flow-documents-and-data-binding

Tried: <DataTemplate>to <HierarchyDataTemplate> no improvement.
what can I do? is it possible HierarchyTemplate with Itemssource




0 Votes 0 ·


The above example, I need using HierarchyTemplate.

https://docs.microsoft.com/en-us/archive/msdn-magazine/2009/april/create-flexible-uis-with-flow-documents-and-data-binding

Tried: <DataTemplate>to <HierarchyDataTemplate> no improvement.
what can I do? is it possible HierarchyTemplate with Itemssource

 <flowdoc:ItemsContent ItemsSource="{Binding Path=HierarchyList}">
 <flowdoc:ItemsContent.ItemsPanel>
 <DataTemplate>
 <flowdoc:Fragment>
 <Table BorderThickness="1" BorderBrush="Black">
 <TableRowGroup flowdoc:Attached.IsItemsHost="True" />
 </Table>
 </flowdoc:Fragment>
 </DataTemplate>
 </flowdoc:ItemsContent.ItemsPanel>
 <flowdoc:ItemsContent.ItemTemplate>
 <DataTemplate>
 <flowdoc:Fragment>
 <TableRow>
 <TableCell>
 <Paragraph>
 <flowdoc:BindableRun BoundText="{Binding Path=Name}" />
 </Paragraph>
 </TableCell>


0 Votes 0 ·


The above example, I need using HierarchyTemplate.

https://docs.microsoft.com/en-us/archive/msdn-magazine/2009/april/create-flexible-uis-with-flow-documents-and-data-binding

Tried: <DataTemplate>to <HierarchyDataTemplate> no improvement.
what can I do? is it possible HierarchyTemplate with Itemssource

 <flowdoc:ItemsContent ItemsSource="{Binding Path=HierarchyList}">
 <flowdoc:ItemsContent.ItemTemplate>
 <DataTemplate>
 <flowdoc:Fragment>
 <TableRow>
 <TableCell>
 <Paragraph>
 <flowdoc:BindableRun BoundText="{Binding Path=Name}" />
 </Paragraph>
 </TableCell>…

related link:
https://stackoverflow.com/questions/66196883/is-there-hierarchicaldatatemplate-available-in-flowdocument-table-like-hierarchi

0 Votes 0 ·

IIs there any Solutions from Microsoft?

0 Votes 0 ·
felixgmca avatar image
0 Votes"
felixgmca answered felixgmca edited

Thanks for the response. Here used frameworkcontentelement only. not BlockUIContainer.

But problem is nested tables create using code behind binding.
main necessary point is using "HierarchyTemplate" for create nested tables.


<Table BorderBrush="Orange" BorderThickness="1">
<TableRowGroup>
<TableRow>
<TableCell>
<Paragraph>Outer Table</Paragraph>
<Table BorderBrush="Yellow" BorderThickness="1" Padding="20">
<TableRowGroup>
<TableRow>
<TableCell Background="AliceBlue">
<Paragraph>Inner Table</Paragraph>
</TableCell>
</TableRow>
</TableRowGroup>
</Table>
</TableCell>
</TableRow>
</TableRowGroup>
</Table>
67780-image.png

Is there any idea????



image.png (3.2 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

GEORGEFELIX-0027 avatar image
0 Votes"
GEORGEFELIX-0027 answered

Is there any solutions from Microsoft?

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.