Flow content and data binding

Hello!

I'm trying to generate a FlowDocument through a data binding (it's some kind of report). And it looks like that all the flow content elements were not designed for data binding.

MSDN suggests to generate such documents programmatically in C#, that is not an option for me — I'd like to separate "look & feel" from data.

Question: Are there any samples/articles about using the data binding in FlowDocuments?

Thanks in advance,

[459 byte] By [PaulShmakov] at [2008-1-8]
# 1

currently we do not support binding to flowdocuments...

the only possibility is binding to the Run's Text Property within a flowdocument...

LesterLobo-MSFT at 2007-10-2 > top of Msdn Tech,Visual Studio Orcas,Windows Presentation Foundation (WPF)...
# 2

Thanks for reply!

It's a great pity you don't support binding.

I hoped to use FlowDocuments as a simple reporting engine. And without bindings it would require loads of code behind.

PaulShmakov at 2007-10-2 > top of Msdn Tech,Visual Studio Orcas,Windows Presentation Foundation (WPF)...
# 3

Unfortunately, Run.Text is not backed by a DependencyProperty, assigning a Binding instance is therefor not applicable. So, how to dynamically set the content of a <Run>?

kunom at 2007-10-2 > top of Msdn Tech,Visual Studio Orcas,Windows Presentation Foundation (WPF)...
# 4

this should help

http://fortes.com/2007/03/20/bindablerun/

leed at 2007-10-2 > top of Msdn Tech,Visual Studio Orcas,Windows Presentation Foundation (WPF)...
# 5

Yes. I chose the variant with an attached property:

http://paulstovell.net/blog/index.php/attached-bindablerun/

kunom at 2007-10-2 > top of Msdn Tech,Visual Studio Orcas,Windows Presentation Foundation (WPF)...

Visual Studio Orcas

Site Classified