Hi Toufique.
You could use FrameworkTemplate's Find method to get a named element from a template.
In your case you have a "Problem" because the Header is in the default TreeViewItem ControlTemplate represented by a ContentPresenter like this:
<ContentPresenter x:Name="PART_Header" ContentSource="Header" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
So the solution could work like this:
FrameworkTemplate ft = pp.HeaderTemplate;
ContentPresenter presenterHeader = pp.Template.FindName("PART_Header", pp) as ContentPresenter;
TextBox obj = ft.FindName("hTreeRenameBox", presenterHeader ) as TextBox;
Kind regards Johannes
P.S. maybe try a proper MVVM pattern implementation with your WPF Project, and get rid of your code-behind and such "problems"?