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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T23:58:30+00:00 2026-06-10T23:58:30+00:00

One of the things that always stumbles me when working with WPF is the

  • 0

One of the things that always stumbles me when working with WPF is the naming convention.

So this is what I have for XAML:

<StatusBar Grid.Row="2" MinHeight="20" Name="StatusBar">
        <StatusBarItem>
            <Border BorderBrush="Black" BorderThickness=".25,.25,0,0">
                <Border BorderBrush="White" BorderThickness="0,0,.25,.25">
                    <TextBlock Name="StatusBarText" Margin="2,2,2,2" >Ready</TextBlock>
                </Border>
            </Border>
        </StatusBarItem>

        <StatusBarItem>
            <Border BorderBrush="Black" BorderThickness=".25,.25,0,0">
                <Border BorderBrush="White" BorderThickness="0,0,.25,.25">
                    <TextBlock Name="FilePathText" Margin="2,2,2,2" >File Path</TextBlock>
                </Border>
            </Border>
        </StatusBarItem>
    </StatusBar>

The content of TextBlock will be databound. I am really not sure what to name my UI elements and properties to avoid any potential ambiguity.

    public string StatusBarText 
   //Maybe StatusText instead of StatusBarText since this 
   //indicates the current status of the application (Ready,Running,Error etc)?
    {
        get { return statusBarText; }
        set
        {
            statusBarText = value;
            NotifyOfPropertyChange(() => StatusBarText);
        }
    }

    public string FilePathText
    {
        get { return filePathText; }
        set
        {
            filePathText = value;
            NotifyOfPropertyChange(() => filePathText);
        }
    }

I mean are those names for properties fine? I feel like if another person is to take a look at those property names, he/she has no way of figuring out that those strings are used for the StatusBar textblock. I guess Hungarian notation might solve this problem but not many people think that’s a good idea nowadays.

What are your suggestions?

  • 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-10T23:58:32+00:00Added an answer on June 10, 2026 at 11:58 pm

    If you’re using MVVM properly, controls generally do not need names because they are never referenced. (Only the data that they’re bound to.)

    The only controls that need names are ones that you absolutely must name to reference in code-behind or something similar, or things that might have relative bindings pointing at them that cannot be relied on to be identified by type.

    As far as naming convention goes, I’ve adopted the UI/ux naming convention for views/controls respectively. The naming clue just goes so far as to hint that it is a control, and not so specific as to the type of control. That way the type can be changed to reflect business needs or wants without requiring you to go and rename references or leave misleading references.

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

Sidebar

Related Questions

This one of the things that has always bothered me about Matlab. I understand
This is one of those things that you read once, say aha! and then
One of the things that always worries me in MySQL is that my string
One of the things that has always bothered me about <jsp:include..> is that it's
This is one of those things that is so simple that no one ever
This is one of this things that should be extremely simple and I just
One of the things that always bugs me about using Readers and Streams in
i notice one nice things that a amazon provide that is load pdf data
One of the things that block objects, introduced in Snow Leopard, are good for
Recently I found out that there are several things that one can do to

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.