locked
Best Design for tree hierarchy in Windows store apps.

    Question

  • Hello, I am developing an app where i need to implement treeview in following manner

    <Finance>
    <Year id="2012">
    <Income>
     <FixedIncome>
       <Income1/>
       <Income2/>
      </FixedIncome>
      <variableIncome>
        <Income1/>
        <Income2/>
      </VariableIncome>
    </Income>
    <Expenses>
      <FixedExpenses>
       <Expense1/>
       <Expense2/>
      </FixedExpenses>
      <variableExpense>
        <Expense1/>
        <Expense2/>
      </VariableExpense>
    </Expenses>
    </Income>
    </Year>
    <Year id="2013">
    <Income>
     <FixedIncome>
       <Income1/>
       <Income2/>
      </FixedIncome>
      <variableIncome>
        <Income1/>
        <Income2/>
      </VariableIncome>
    </Income>
    <Expenses>
      <FixedExpenses>
       <Expense1/>
       <Expense2/>
      </FixedExpenses>
      <variableExpense>
        <Expense1/>
        <Expense2/>
      </VariableExpense>
    </Expenses>
    </Income>
    </Year>
    </Finance>

    Can you suggest or point some best way to design this hierarchy? Do you composite design will be preferable? I mean some thing like below.

    class Node
    {
      Node Parent;
      List<Node> ChildNodes;
    }

    Any inputs?

    Thanks


    Vamsidhar M

    Thursday, January 16, 2014 8:37 AM

All replies

  • look how mail implemented folders? would that be something that fits for your scenario?

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Thursday, January 16, 2014 1:19 PM
  • Yes. Taht will work. Can you point any link on how to implement this?

    Vamsidhar M

    Thursday, January 16, 2014 2:27 PM
  • I like the idea of something similar to the mail folders as suggested, but is this for a multi-line Select box or for the main UI content? If for the first scenario, check out the Windows SDK sample Essential Controls Sample.

    Regards,

    Christine

    Thursday, February 13, 2014 10:59 PM
  • look how mail implemented folders? would that be something that fits for your scenario?
    Saturday, April 12, 2014 8:19 AM