Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - Databind <List>?

 
 
Old 01-31-2006   #1 (permalink)
RyanLeeSchneider


 
 

Databind <List>?


I'm having trouble figuring out how to databind a <List> inside a
<FlowDocument>. I've tried using a <itemsControl> with a ItemsPanelTemplate
of <List>, but because List is not derived from Panel that doesn't work.

I know I could use a <ListBox>, but then the text isn't selectable along
with the rest of the FlowDocument...

Is it possible to databind a <List>?

My System SpecsSystem Spec
Old 01-31-2006   #2 (permalink)
RyanLeeSchneider


 
 

RE: Databind <List>?


Ok, I think I see why Document don't support databinding because of all the
intricacies involved, so what's the best current work-around if I want to
dynamically create a document from data?

My app has a databound treeview on the left, and details of the selected
node on the right. Previously I was using <TextBlock>s bound to different
properties of my objects to create the details, however I realized I need the
text to be selectable and copyable, so switched to using a
<FlowDocumentReader>, but can't get a nice generic databinding solution to
work.

The way I see it I can:

-Subclass FlowDocument for each of my classes and add DPs I can bind to.
-Subclass Paragraph, List, etc. to add DPs I can bind to, then create my
datatemplates in XAML using my new classes.
-Create a helper object that takes in one of my classes and spits out XAML.
-Subclass my classes with a ToDocument() method that returns a Document (or
raw XAML as a string).

Any suggestions on which route to proceed?

Thanks,

Ryan
My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
Problem copying list of contacts into a new group list Vista mail
add my contact list to safe senders list Vista mail
converting email list to mailing list .NET General
Network List Service is missing from the list of services Network & Sharing


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46