I made WPF for ChannelTreeView using This codes.

= Xaml =
Code:
<TreeView.Resources>
                <HierarchicalDataTemplate DataType="{x:Type self:WPFName+TreeItem}" ItemsSource="{Binding Children}">
                    <StackPanel Orientation="Horizontal">
                        <ContentPresenter Content="{Binding Data}"/>
                    </StackPanel>
                </HierarchicalDataTemplate>
                <DataTemplate DataType="{x:Type HelperClasses:ChannelListEntry}">
                    <StackPanel Orientation="Horizontal">
                        <Border Background="Green" Width="8" Height="12" BorderBrush="#00000000"></Border>
                        <TextBlock Text="{Binding Path=Name}"/>
                    </StackPanel>
                </DataTemplate>
                <DataTemplate DataType="{x:Type HelperClasses:ClientListEntry}" >
                    <StackPanel Orientation="Horizontal">
                        <Border Background="DarkBlue" Width="8" Height="12" BorderBrush="#00000000"></Border>
                        <TextBlock Text="{Binding Path=Nickname}" Foreground="blue" />
                    </StackPanel>
                </DataTemplate>
            </TreeView.Resources>
= C# =
Code:
private void treeView_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
        {
            object temp = treeView.SelectedItem;
            MessageBox.Show(temp.ToString());
        }

        private static IEnumerable<TreeItem> GetChannelTreeForTreeView(QueryRunner queryRunner)
        {
            List<ChannelTreeItem> channelTree = queryRunner.Utils.GetChannelTree(false);

            foreach (ChannelTreeItem channelTreeItem in channelTree)
            {
                TreeItem treeViewItem = new TreeItem { Data = channelTreeItem.Channel };
                FillTreeViewItem(treeViewItem, channelTreeItem);
                yield return treeViewItem;
            }
        }

        private static void FillTreeViewItem(TreeItem treeViewItem, ChannelTreeItem channelTreeItem)
        {
            foreach (ClientListEntry clientListEntry in channelTreeItem.Clients)
                if(clientListEntry.Nickname.Contains("serveradmin from") == false) {
                    treeViewItem.Children.Add(new TreeItem { Data = clientListEntry });
                }

            foreach (ChannelTreeItem childChannelTreeItem in channelTreeItem.Children)
            {
                TreeItem childTreeViewItem = new TreeItem { Data = childChannelTreeItem.Channel };
                treeViewItem.Children.Add(childTreeViewItem);
                FillTreeViewItem(childTreeViewItem, childChannelTreeItem);
            }
        }

        public class TreeItem
        {
            public object Data { get; set; }
            public List<TreeItem> Children { get; private set; }

            public TreeItem()
            {
                Children = new List<TreeItem>();
            }
        }
I want to get original value.
For example. If i select the client or channel, get client or channel value.

but, MessageBox Showing 'WPFName + TreeItem'
I don't know how to get original value!
Please Help me