Data type based data template

I have the following data type template in resource dictionary:

<DataTemplate DataType="{x:Type vm:TreeView_ViewModel}">

(ucTreeLevelTreeView looks correct when I drop it on the window.)

I am  trying to set object of the type TreeView_ViewModel as content for HeaderedContentControl. I would expect to see ucTreeLevelTreeView  after adding  the following code to MainWindow.xaml:
<HeaderedContentControl Header="Report Selection" Content="{Binding Path=Reports}"/>

But HeaderedContentControl  is empty. There is no errors.

This is the code from MainWindowViewModel class that is set as DataContext for the form MainWindow:

public class MainWindowViewModel
         TreeView_ViewModel _reportview;

        public MainWindowViewModel()
            _reportview = new TreeView_ViewModel();

        public TreeView_ViewModel Reports
            get { return _reportview; }


This is my first WPF project, so I may not explained my problem properly. Any help would be highly appreciated.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Aaron JabamaniTechnical ArchitectCommented:
Can we see the your whole xaml please.
crcsupportAuthor Commented:
This is the code for MainWindow that suppose to display custom control ucTreeLevelTreeView:
        xmlns:local="clr-namespace:ReportManager" x:Name="formMainWindow" x:Class="ReportManager.MainWindow"
        Height="350" Width="525" Title="{Binding DisplayName}" WindowStartupLocation="CenterScreen" >
        <ResourceDictionary Source="Resources\MainResource.xaml"/>
        <DockPanel DockPanel.Dock="Top" KeyboardNavigation.TabNavigation="None" Margin="0,0,0,0" Height="22" VerticalAlignment="Top">
            <Menu Height="22" VerticalAlignment="Top" KeyboardNavigation.TabNavigation="Cycle">
                <MenuItem Header="_Rights" />
                <MenuItem Header="_Help" />
                <MenuItem Header="E_xit" Command="{Binding CloseCommand}" />
        <Grid Margin="2">
                <ColumnDefinition Width="130" />
                <ColumnDefinition Width="6"/>
                <ColumnDefinition />
            <Border BorderBrush="Black" BorderThickness="1" Margin="0" >
                <HeaderedContentControl Header="Report Selection"
                    Content="{Binding Path=Reports}"/>

This is the custom control ( 3-level TreeView):

<UserControl x:Class="ReportManager.ucTreeLevelTreeView"
             d:DesignHeight="300" d:DesignWidth="300">
        <DataTemplate x:Key="report">
            <TextBlock Text="{Binding Path=Name}" />
        <HierarchicalDataTemplate x:Key="subsection"
                                  ItemsSource="{Binding ManagedNodes}"
                                  ItemTemplate="{StaticResource report}">
            <TextBlock Text="{Binding Path=Name}" />

        <HierarchicalDataTemplate x:Key="section"
                                  ItemsSource="{Binding NodeList}"
                                  ItemTemplate="{StaticResource subsection}">
            <TextBlock Text="{Binding Path=NodeName}" />

            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        <TreeView Grid.Row="1"
                      ItemTemplate="{StaticResource section}"
                      ItemsSource="{Binding Path=Reports}"
                      SelectedValuePath="{Binding Path=Name}"
                      Name="tvReports" />

            <GridSplitter Grid.Row="0" Grid.Column="1" Margin="2,0,2,0"
                        Width="5" Background="LightBlue" VerticalAlignment="Stretch" HorizontalAlignment="Center" />

crcsupportAuthor Commented:
I found work around

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
crcsupportAuthor Commented:
found work around
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.