RKM
RKM

Reputation: 3241

What is the difference between "User Control" and "Page" in Silverlight?

I am really new to Silverlight. I am working through some of the sample codes I found online.

I notices sometimes a new "Page" is added, and sometimes a new "User Control" is added.What are the differences between those 2?

Btw, when I tried specifying the URL for a hyperlink as "www.apple.com", there is an error saying "www.apple.com" can not be found. Are there anyway of specifying an URL for a website for a HyperlinkButton?

Thanks :)

Upvotes: 2

Views: 2651

Answers (2)

user1512559
user1512559

Reputation:

User Control:

When you build your project , any user control that you created will appear in the toolbox also. You can drag and drop it like any other control (like a button or a grid).User controls are used for enhanced flexibility. You can customize your controls, set as many properties you want , and it really simplifies things without going for creating custom controls.

Page:

However, when you come to a Page, you can use it mostly for Navigation . It can contain other controls , but it is mainly intended for Navigation within Frames.

Upvotes: 0

Aaron McIver
Aaron McIver

Reputation: 24713

In SL3 and up; a Page correlates to the Navigation framework whereas a UserControl is a control providing a defined set of functionality using multiple controls which can then be used within a Page.

Upvotes: 2

Related Questions