2 Replies - 2491 Views - Last Post: 07 January 2011 - 01:04 PM Rate Topic: -----

#1 falcon eyes   User is offline

  • D.I.C Head

Reputation: -4
  • View blog
  • Posts: 53
  • Joined: 16-April 07

How to save TreeView structure in WPF

Posted 06 January 2011 - 02:39 PM

Hi every body
I'm trying to write a WPF application and it includes a treeview, and my problem is how to save the structure of my treeview so that i can reconstruct it later i know that i should implement recursive Fn but i failed to do it(although i did it in treeview of window form) so if any one have an idea about how to implement this fn in WPF or have any other idea be my guest.

MOD EDIT: Moved to WPF Forum.

This post has been edited by JackOfAllTrades: 06 January 2011 - 03:14 PM

Is This A Good Question/Topic? 0
  • +

Replies To: How to save TreeView structure in WPF

#2 bflosabre91   User is offline

  • D.I.C Lover

Reputation: 105
  • View blog
  • Posts: 1,439
  • Joined: 22-February 08

Re: How to save TreeView structure in WPF

Posted 07 January 2011 - 08:28 AM

you want to save the treeview structure in a database or to an xml file or something? you would need to just create a new row for each treeviewitem and have a columns for each of the properties you set. so then you retrieve the rows from the database or the xml file and loop through each row(which each row is one treeviewitem), and create the treeviewitem based on those properties and add the item to the treeview.
Was This Post Helpful? 0
  • +
  • -

#3 falcon eyes   User is offline

  • D.I.C Head

Reputation: -4
  • View blog
  • Posts: 53
  • Joined: 16-April 07

Re: How to save TreeView structure in WPF

Posted 07 January 2011 - 01:04 PM

thanks for your answer i will try your solution and hope to success
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1