Click here to Skip to main content
15,915,724 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Is WPF actually useful for most businesses? Pin
Pete O'Hanlon21-Oct-08 4:46
mvePete O'Hanlon21-Oct-08 4:46 
GeneralRe: Is WPF actually useful for most businesses? Pin
RugbyLeague21-Oct-08 4:50
RugbyLeague21-Oct-08 4:50 
GeneralRe: Is WPF actually useful for most businesses? Pin
Pete O'Hanlon21-Oct-08 5:06
mvePete O'Hanlon21-Oct-08 5:06 
GeneralRe: Is WPF actually useful for most businesses? Pin
Jammer21-Oct-08 9:06
Jammer21-Oct-08 9:06 
GeneralRe: Is WPF actually useful for most businesses? Pin
RugbyLeague21-Oct-08 22:59
RugbyLeague21-Oct-08 22:59 
GeneralRe: Is WPF actually useful for most businesses? Pin
Jammer22-Oct-08 10:41
Jammer22-Oct-08 10:41 
GeneralRe: Is WPF actually useful for most businesses? Pin
RugbyLeague22-Oct-08 11:15
RugbyLeague22-Oct-08 11:15 
QuestionBeginner Pin
Hossein Afyuoni20-Oct-08 18:49
Hossein Afyuoni20-Oct-08 18:49 
AnswerRe: Beginner Pin
Jammer20-Oct-08 22:29
Jammer20-Oct-08 22:29 
AnswerRe: Beginner Pin
Pete O'Hanlon20-Oct-08 22:44
mvePete O'Hanlon20-Oct-08 22:44 
GeneralRe: Beginner Pin
elektrowolf21-Oct-08 0:20
elektrowolf21-Oct-08 0:20 
GeneralRe: Beginner Pin
Pete O'Hanlon21-Oct-08 0:46
mvePete O'Hanlon21-Oct-08 0:46 
QuestionProperty value updation not displayed Pin
vinod.sankuthodi19-Oct-08 20:06
vinod.sankuthodi19-Oct-08 20:06 
AnswerRe: Property value updation not displayed Pin
Pete O'Hanlon20-Oct-08 0:43
mvePete O'Hanlon20-Oct-08 0:43 
Questioncould any one help in how to create seprate dlls in wpf project? Pin
dwarakk19-Oct-08 0:47
dwarakk19-Oct-08 0:47 
AnswerRe: could any one help in how to create seprate dlls in wpf project? Pin
Jammer19-Oct-08 2:39
Jammer19-Oct-08 2:39 
AnswerRe: could any one help in how to create seprate dlls in wpf project? Pin
User 27100919-Oct-08 4:58
User 27100919-Oct-08 4:58 
QuestionXAML Power Toys 3.4 Released Pin
User 27100918-Oct-08 20:25
User 27100918-Oct-08 20:25 
AnswerRe: XAML Power Toys 3.4 Released Pin
Michael Sync18-Oct-08 21:39
Michael Sync18-Oct-08 21:39 
GeneralRe: XAML Power Toys 3.4 Released Pin
User 27100919-Oct-08 4:59
User 27100919-Oct-08 4:59 
QuestionHow to bind TreeView with nested object without using HierarchicalDatatemplate Pin
Michael Sync18-Oct-08 5:12
Michael Sync18-Oct-08 5:12 
Hello All,

Is there any way to bind TreeView with nested object without using HierarchicalDatatemplate?

For example:

<Window x:Class="WpfApplication1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="300">
<Grid>
<TreeView Margin="10,10,46,52" Name="familyTreeView"
/>
</Grid>
</Window>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace WpfApplication1 {
/// <summary>
/// Interaction logic for Window1.xaml
/// </summary>
public partial class Window1 : Window {
public Window1() {
InitializeComponent();
List<Person> _family = new List<Person>();
Person mom = new Person() { Name = "Hteik Tin May" };

mom.Children.Add(new Person() { Name = "Michael Sync" });
mom.Children.Add(new Person() { Name = "Shwesin Sync" });
mom.Children.Add(new Person() { Name = "Aye Nyein Thu" });
mom.Children.Add(new Person() { Name = "Kyaw Zin Thu" });


_family.Add(mom);
familyTreeView.ItemsSource = _family;
familyTreeView.DisplayMemberPath = "Name";
}
}

public class Person {
readonly List<Person> _children = new List<Person>();
public IList<Person> Children {
get {
return _children;
}
}
public string Name { get; set; }
}
}


It's not working without HierarchicalDatatemplate.

Any idea?

Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)


AnswerRe: How to bind TreeView with nested object without using HierarchicalDatatemplate Pin
User 27100918-Oct-08 20:11
User 27100918-Oct-08 20:11 
GeneralRe: How to bind TreeView with nested object without using HierarchicalDatatemplate Pin
Michael Sync18-Oct-08 21:37
Michael Sync18-Oct-08 21:37 
GeneralRe: How to bind TreeView with nested object without using HierarchicalDatatemplate Pin
User 27100919-Oct-08 4:55
User 27100919-Oct-08 4:55 
QuestionQuick Question Pin
MrMcIntyre18-Oct-08 1:52
MrMcIntyre18-Oct-08 1:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.