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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T20:32:45+00:00 2026-06-18T20:32:45+00:00

This all began as an attempt to have a numeric textbox. That part is

  • 0

This all began as an attempt to have a numeric textbox. That part is irrelevant but it’s why I created the following class. (By the way, using VS 2012 Express, WPF, C# code-behind).

using System;
using System.Windows.Controls;

    namespace Herculese
    {
        public class IntBox : TextBox
        {
            <!-- irrelevant code here-->
        }
    }

So far, so good. I build and this becomes a control which I proceed to use in the xaml:

<local:IntBox Name="txtBox_heightft" Width="60" TextChanged="txtBox_Numeric_Changed" />

Then in my code behind where I’m trying to refer to the text in the textbox using “txtBox_heightft.Text”, I’m informed that “The name ‘txtBox_heightft’ does not exist in the current context”. This confuses me to no end because if I change “local:IntBox” to “TextBox” in the xaml, it works fine but then of course it’s a regular textbox and not my modified version. Do I need to add a reference to the class in the codebehind somehow? This is my first attempt at using a class this way, as I’ve never needed functionality that wasn’t provided by default.

  • 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-06-18T20:32:46+00:00Added an answer on June 18, 2026 at 8:32 pm

    The problem is that you are using Name as a dependency property, you need to use x:Name=”txtBox_heightft” as an extension property 🙂

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

Sidebar

Related Questions

I have a feeling I'm going about this all wrong. But anyway. I have
This all worked fine in rails 2.3.5, but when a contractor firm upgraded directly
sorry if this all seem nooby and unclear, but I'm currently learning Netlogo to
I see this all the time: object literals declared such that some keys are
I have been struggling with this all day. I have an html table in
This has bothered me for quite a while, but now it is necessity that
Hey all. I have the following code: http://jsfiddle.net/g7Cgg/ As you can see, there are
I have a very generic set of three tables that store all of my
I have a method 'rate_limited_follow' that takes my Twitter useraccount and follows all the
All SQL Servers are SQL Server 2008.... I have a table that is replicated

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.