![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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. |
| |||||||
| |
| | #1 (permalink) |
| | 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 Specs![]() |
| | #2 (permalink) |
| | 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 Specs![]() |
| 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 | |||