Unfortunately, while trying to delete your fake answer, after editing your post to put your response where it belongs, I accidentally deleted my answer. However, I notice you gave me a 1 vote for trying to help you, so I'm not sure what else I should say.
cv_sudheer wrote:
So one file contacts with other 'g.cs' file in background.
Correct, that's a machine generated file. It has nothing to do with your question.
cv_sudheer wrote:
as of my knowledge that XAML will support visual inheritance.
Well, your understanding appears to be wrong.
cv_sudheer wrote:
SMS.PgBase cannot be root of a XAML file because it was defined using XAML."
The error is TELLING you that you can't do it. What other questions did you have ? I googled and it seems this was supported at one stage, perhaps, but everyone agrees that it's explicitly forbidden now. Which makes sense. As I said in the reply you downvoted, if there's XAML in page1, and there's XAML in page2, which derives from page1, where does the page1 XAML get rendered inside page2 ? You'd need an explicity mechanism like Master Pages in ASP.NET in order to define something like that logically. Without such an explicit definition, it just can't work.
Actually, the thread I found with google is where you asked the exact same thing on MSDN. However, shortening it to the EXACT error message, and not what you posted, gave me a ton of hits, including
this[
^]. I suggest in future, your first port of call in a situation like this should be to type the EXACT error message, in quotes, without any bits that have the name of your specific classes, into google, and see what you get. I was right. It's not supported. You can't do it.