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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T03:17:44+00:00 2026-05-22T03:17:44+00:00

Totally new to custom control creation in Silverlight. I’m wanting a custom control that

  • 0

Totally new to custom control creation in Silverlight.

I’m wanting a custom control that inherits from a TextBox control. I’ve found plenty of tutorials but they all do something like watermarked text or other attached properties. My goal is only to manipulate text at time of entry using the KeyUp event, so visually my TextBox is no different from a standard TextBox.

I created a class file and inherited from TextBox, but at run-time the textbox doesn’t display. From what I can gather I need a themes/generic.xaml file, but all of samples I’ve seen include styles for the additional properties, and in my ignorance I don’t know what to change and/or remove.

I’m hoping someone can point me to a generic plain-jane TextBox style definition or a tutorial of such.

  • 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-22T03:17:45+00:00Added an answer on May 22, 2026 at 3:17 am

    What you described should work, I just tried the following and the TextBoxEx renders just fine:

    public class TextBoxEx : TextBox
    {
      protected override void OnKeyUp(KeyEventArgs e)
      {
        base.OnKeyUp(e);
      }
    }
    

    You do not need to add a generic.xaml file. This file is used to provide a template which defines the look of your control. You specify the default look of your control by setting the following property:

    DefaultStyleKey = typeof(MyControl);
    

    However, as the above TextBoxEx does not set this property, it uses the value inherited from TextBox and hence it inherits the same template (i.e look).

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

Sidebar

Related Questions

I am totally new to SWIG interfaces and how to use this with C
I am totally new to Spring Web Services and so what concept should I
I'm totally new to Ruby but not to programming. All I did was going
I am totally new to JBoss. Basically i am needed to setup a JBoss
Okay, I'm totally new to Python, so I decided to make a simple app.
My question is straight forward. I'm totally new to the Microsoft stack, I have
I'm trying to convert CSV data into paring array data, but I'm totally new
sadly i am totally new to jquery-writing and after googling for 12 hours to
I'm new to Drupal and am experiencing this strange problem with my testing Drupal
I am trying to pick up ASP.Net - and following the mvc tutorial: http://www.asp.net/mvc/tutorials/mvc-music-store-part-4

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.