I have used the following code to use offline tpk.
Here, It shows the error that InitializeComponent does not exist in the current Context.
The namespace name and class name are match, but still it shows that error. I couldn't find the apt solution.
It would be helpful if anyone has a solution for this.