开发者

Usercontrol issue

开发者 https://www.devze.com 2023-03-16 10:02 出处:网络
I have got a very big confusing question..开发者_StackOverflow.. is .xaml file is a page or a usercontrol.

I have got a very big confusing question..开发者_StackOverflow..

is .xaml file is a page or a usercontrol. Simple words is silver light has pages or every silver light page is called as a usercontrol????

I have a scenario: firstly i have mainpage and app.xaml.

I have added myPage.xaml as a sivlerlight usercontrol. This has same extension and code behind same as main page. I am able to find mypage as a silverlight usercontrol in Toolbox menu but not Mainpage... Is there any specific reason i cannot use mainpage as a usercontrol...???

Any answers appreciated.

Thanks in advance...


When you right click the project and select Add New Item, you can choose to add either a Silverlight page or a user control. Both are written in xaml, but one starts with <Page> and the other with <UserControl>

** edited with HiTech Magic's correction

A User Control is the base class for writing your own .xaml object. A Page inherits from a User Control, but has additional functionality (you can navigate to it inside a Frame)

Hope this helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号