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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:03:51+00:00 2026-05-23T01:03:51+00:00

I have a textblock in my XAML where the Visibility is bound to a

  • 0

I have a textblock in my XAML where the Visibility is bound to a property in my viewmodel. When the window first loads, the value from the viewmodel determines the visibility correctly (I tried manually overriding the backing store variable value and it works great, hiding the control as I need). However, when I change the property value the visibility doesn’t change.

Here’s the XAML for the control:

<TextBlock Text="Click the button" Style="{StaticResource Message}" Visibility="{Binding NoResultsMessageVisibility}" />

The “NoResultsMessageVisibility” property that I bind to is this:

    public Visibility NoResultsMessageVisibility
    {
        get { return _noResultsMessageVisibility; }
        set
        {
            _noResultsMessageVisibility = value;
            NotifyPropertyChanged("NoResultsMessageVisibility");
        }
    }

NotifyPropertyChange raises a PropertyChanged event for the provided name using standard INotifyPropertyChanged.

Can anyone spot my mistake?

EDIT

In response to the comments / answer so far.

The program is super simple so there’s no parallelism / multithreading used.
The DataContext is set only once when the window loads, using:

new MainWindow { DataContext = new MainWindowViewModel() }.ShowDialog();

The binding does seem to work when first loaded. I’ve noticed as well that a textbox I have bound to a property isn’t updating when I change the property. However, the property is definitely updating when I change the textbox as the value is used as the basis for a command that’s bound to a button. As the text changes, the button is enabled and disabled correctly and when I click it the value from the property is correct. Again, if I set a value against the backing store variable, this shows in the textbox when the window first loads.

  • 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-23T01:03:52+00:00Added an answer on May 23, 2026 at 1:03 am

    Solved it. I’m a dozy dork 🙂

    I have copied some code from another class and for some reason I’d added the PropertyChanged event to my viewmodel’s interface, rather than implementing INotifyPropertyChanged on the interface. D’Oh!

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

Sidebar

Related Questions

I have the following defined in xaml: <Setter Property=Template> <Setter.Value> <ControlTemplate> <Popup Visibility=Visible> <TextBlock
I have a XAML window with multiple TextBoxes, each with a corresponding TextBlock tag
I have a xaml TextBlock bound as follows: <TextBlock Text={Binding LastName}/> How do I
I have following XAML: <TextBlock HorizontalAlignment=Center VerticalAlignment=Center FontSize=10 FontFamily=Arial Foreground=#414141> <Run Text={Binding LoadsCount} />
currently I have this in my XAML: <phone:PhoneApplicationPage.Resources> <toolkit:RelativeTimeConverter x:Key=RelativeTimeConverter/> </phone:PhoneApplicationPage.Resources> .... <TextBlock x:Name=txtTimeAdded
Lets say i have a TextBlock thats bound to a DateTime, is there any
Let's say we have a XAML code like this: <Style TargetType={x:Type ListBoxItem}> <Setter Property=Template>
I have a textblock bound to an object. The 2-way binding works well and
I have some xaml pasted at the end of this question. It's from a
I have a user control that has a Title property bound to the Text

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.