Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1070923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T20:38:28+00:00 2026-05-16T20:38:28+00:00

I am developing controls for WP7 application. I am aware that I can quickly

  • 0

I am developing controls for WP7 application. I am aware that I can quickly create control by inheriting from UserControl class (that derives from Control class). Also, that such controls cannot be customized, i.e., all the properties associated with control are those harcoded in user control – they cannot overridden in xaml etc. But can somebody please share the best practises / situations as to when to inherit directly from Control class vs ContentControl/ItemControl class vs UserControl class (am I missing any other options?)?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T20:38:29+00:00Added an answer on May 16, 2026 at 8:38 pm

    Here is a brief description of each control types that you mentioned:

    1.ItemsControl – it is usually used when you want to have a control with items like for example ListBox,TreeView etc. One of the most important parts when deriving from ItemsControl is to override :

    GetContainerForItemOverride

    IsItemItsOwnContainerOverride

    PrepareContainerForItemOverride

    Here is an example:

    http://www.silverlightshow.net/items/How-to-inherit-from-ItemsControl-and-create-a-UniformGrid-with-containers.aspx

    Note that the sample is not with the latest Silverlight version but it explains in details how to implement a custom control.

    2.Control – when you want to implement a simple control that has no Content or Items properties like a TextBox for example you can derive from Control.

    3.ContentControl – when you need to place some content in the control.Like for example the button Content. It depends on your need what will be the choice of the base class.

    You can also take a look at the rest of the tutorials that SilverlightShow provides connected with “how to implement a custom control”.

    I hope that this will answer your question.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently developing some user controls so that I can use them at
I'm developing a web application that shows some controls and descriptions dynamically (I don't
I'm building a custom WPF control that derives from TabControl. In the ControlTemplate, I'm
I am developing a user control for WP7 application. I added the control to
I am developing an Android application that controls the PC keyboard and mouse. I
I am developing one application that has many controls to format the text. The
I am developing a custom control derived from System.Windows.Controls.ContentControl. In the controls default template
We are developing a .NET application that uses a few custom controls. One specific
We are developing a WPF application which uses Telerik's suite of controls and everything
I'm developing a VB.NET 1.1 web application. All validation and RegEx controls work perfectly

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.