On selecting through left click it appears like this.

On Selecting through right click it appears like this
Here you can see although context menu is opened but the Item book got grayed out.

How can we resolve this problem.
I have created Tree and its Context menu through Code not through XAML.
That is goverend by some resources, the unfocused item will have the brush that can be foundusing the
SystemColors.ControlBrushKey, so you can override the brush that will be found by using the same key locally:The forground will normally still change but you seem to have overridden that already.
(You should use more XAML by the way)