![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | 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) |
| Guest | 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 | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| add my contact list to safe senders list | joha | Vista mail | 1 | 06-17-2008 11:13 AM |
| converting email list to mailing list | Duane | .NET General | 1 | 05-13-2008 12:02 AM |
| Network List Service is missing from the list of services | digital-flex | Network & Internet | 2 | 05-06-2008 04:21 PM |
| DataBind Outlook Interop AppointmentItems to WPF Controls using CO | JelloDog | Avalon | 0 | 02-26-2008 11:01 AM |
| How to get a list of PropertyName from the format-list cmdlet? | Dung K Hoang | PowerShell | 4 | 10-07-2006 07:51 AM |