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

The Archive Base Latest Questions

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

I have created a custom window control (inherited from Window), all is fine except

  • 0

I have created a custom window control (inherited from Window), all is fine except the text of my status bar. I have added a new property to my control called “StatusText” and this text is shown inside a TextBlock in my control’s style.

But when I change the StatusText property of my window the text doesn’t change, it’s not update. On another side, if I change the Title property of my window (which is an inherited property) the Title change correctly.

So maybe I have not correctly declared my StatusText property ? Or I need to explicitly ask for the TextBlock in my style to update ?

Thank for your help.

StatusText Property Declaration :

    private string m_StatusText;

    public string StatusText
    {
        get { return m_StatusText; }
        set { m_StatusText = value; }
    }

XAML Style for the status bar :

<!-- Status area -->
<Border Grid.Row="2" Style="{DynamicResource SFM_StatusAreaStyle}" CornerRadius="0, 0, 7, 7" BorderThickness="1, 1, 1, 0">
    <Grid Style="{DynamicResource SFM_TitleBarStyleReflect}">
          <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Margin="6, 0, 0, 2" Foreground="{DynamicResource B_TextColor}" 
                                Text="{Binding Path=StatusText, RelativeSource={RelativeSource AncestorType={x:Type local:SiluForm}, Mode=FindAncestor}}" />
    </Grid>
 </Border>
  • 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-16T21:28:08+00:00Added an answer on May 16, 2026 at 9:28 pm

    Implement INotifyPropertyChanged in your class containing StatusText and then insert code of rasing PropertyChanged event in setter of StatusText:

    public class MyClass : INotifyPropertyChanged
    {
        private string m_StatusText;
    
        public string StatusText
        {
            get { return m_StatusText; }
            set 
            { 
                 m_StatusText = value; 
                 raiseOnPropertyChanged("StatusText");
            }
        }
    
       #region Implementation of INotifyPropertyChanged
    
            public event PropertyChangedEventHandler PropertyChanged;
    
            private void raiseOnPropertyChanged(string propertyName)
            {
                if (PropertyChanged != null)
                    PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
    
            #endregion
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a simple Asp.Net custom control which automatically combines all the correct
I have created custom MembershipUser, MembershipProvider and RolePrivoder classes. These all work and I
If have created a custom role within SqlServer which I added to the db__denydatareader
I have my own custom control derived from System.Windows.Forms.TreeView which is present on the
I have created a custom control that is included in a control library that
I have created a custom WPF user control which is intended to be used
I have a custom control called TextBoxWithLabelAndUnits . From the name, you can tell
I have created a custom dialog for Visual Studio Setup Project using the steps
I have created a small flash CS4 project that has a few custom components
I'm interested in seeing what custom extensions other developers have created for the ASP.NET

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.