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 604005
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:59:31+00:00 2026-05-13T16:59:31+00:00

I am creating a number of custom controls for a Silverlight 4 project. I

  • 0

I am creating a number of custom controls for a Silverlight 4 project. I have successfully created one control and am wondering if I can define more in the same project and then have all the controls bundled into one .DLL.

Right now, I have the standard files for the first control:

/Resources/icon.png
/themes/generic.xaml 
/CustomControl1.cs
/CustomControl1EventArgs

I am thinking it’s not possible, as there can only be one “generic.xaml”.

Thanks,

Scott

  • 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-13T16:59:31+00:00Added an answer on May 13, 2026 at 4:59 pm

    Yes you can create multiple controls in the same project, you simply have to place the all the default templates in a single /themes/generic.xaml file. Each controls template is identified by the TargetType. So your generic.xaml file would look something like:-

     <ResourceDictionary ... blah namespace stuff ...>
    
       <Style TargetType="local:CustomControl1">
         <Setter Property="Template">
           <Setter.Value>
             <ControlTemplate TargetType="local:CustomControl1">
               <!-- Template for Custom control 1 -->
    
              </ControlTemplate>
           </Setter.Value>
         </Setter>
       </Style>
    
       <Style TargetType="local:CustomControl2">
         <Setter Property="Template">
           <Setter.Value>
             <ControlTemplate TargetType="local:CustomControl2">
               <!-- Template for Custom control 2 -->
    
              </ControlTemplate>
           </Setter.Value>
         </Setter>
       </Style>
    
       <!-- and so on -->
    
    </ResourceDictionary>
    

    The Silverlight Toolkit chapies do have a neat tool which allows you to place each control template in its own file. The tool dynamically constructs the generic.xaml from the contents of all these files. I really wish they’d blog about it so we could find out how to use it ourselves. Hello any of you Msofties lurky listening in?

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

Sidebar

Related Questions

I have a number of custom Item and Project Templates for Visual Studio 2010.
In my current project, I am creating a number of user controls, some of
How would one go about creating a custom protocol? I know you can create
I am creating and putting a custom number bar on top of regular keypad.
I have the task of creating implementations for a large number of metric data
So yes I'm very new to creating my own custom events. I can do
How would I go about creating a custom number pad like what is used
I have a project whereby a large number of technical specifications are currently 'published'
In ASP.NET, when creating a custom config section, how do I limit the number
Hi I am creating a wordpress custom page theme, I have included the code.

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.